mirror of
https://github.com/bckelley/cgm-remote-monitor.git
synced 2026-08-24 03:14:12 -05:00
Revert "Revert "allow temp basals for last two days""
This reverts commit 683cb3be63.
This commit is contained in:
@@ -114,9 +114,9 @@ function mergeToTreatments (ddata, results) {
|
||||
});
|
||||
|
||||
//filter out temps older than a day and an hour ago since we don't display them
|
||||
var oneDayAgo = ddata.lastUpdated - ONE_DAY - times.hour().msecs;
|
||||
var oldestAgo = ddata.lastUpdated - TWO_DAYS - times.hour().msecs;
|
||||
treatments = _.filter(treatments, function noOldTemps (treatment) {
|
||||
return !treatment.eventType || treatment.eventType.indexOf('Temp Basal') === -1 || treatment.mills > oneDayAgo;
|
||||
return !treatment.eventType || treatment.eventType.indexOf('Temp Basal') === -1 || treatment.mills > oldestAgo;
|
||||
});
|
||||
|
||||
ddata.treatments = _.union(ddata.treatments, treatments);
|
||||
@@ -248,4 +248,4 @@ function loadDeviceStatus (ddata, env, ctx, callback) {
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = init;
|
||||
module.exports = init;
|
||||
|
||||
Reference in New Issue
Block a user