mirror of
https://github.com/bckelley/cgm-remote-monitor.git
synced 2026-08-24 03:14:12 -05:00
One more increase to treatment load time to cover long overrides
This commit is contained in:
+3
-1
@@ -10,7 +10,9 @@
|
||||
"ONE_DAY" : 86400000,
|
||||
"TWO_DAYS" : 172800000,
|
||||
"FIFTEEN_MINUTES": 900000,
|
||||
"THIRTY_MINUTES": 1800000,
|
||||
"ONE_HOUR": 3600000,
|
||||
"THREE_HOURS": 10800000,
|
||||
"FOUR_HOURS": 14400000,
|
||||
"ONE_HOUR": 3600000
|
||||
"SIX_HOURS": 21600000
|
||||
}
|
||||
|
||||
@@ -309,7 +309,7 @@ function loadTreatments(ddata, ctx, callback) {
|
||||
// Load 2.5 days to cover last 48 hours including overlapping temp boluses or temp targets for first load
|
||||
// Subsequently load at least 15 minutes of data, but if latest entry is older than 15 minutes, load until that entry
|
||||
|
||||
const loadPeriod = ddata.treatments && ddata.treatments.length > 0 && !withFrame ? constants.FOUR_HOURS : longLoad;
|
||||
const loadPeriod = ddata.treatments && ddata.treatments.length > 0 && !withFrame ? constants.SIX_HOURS : longLoad;
|
||||
const latestEntry = ddata.treatments && ddata.treatments.length > 0 ? findLatestMills(ddata.treatments) : ddata.lastUpdated;
|
||||
const loadTime = Math.min(ddata.lastUpdated - loadPeriod, latestEntry);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user