Improve accuracy of extended bolus duration (from 1 min to 1 second)

This commit is contained in:
Philoul 2021-06-10 00:23:00 +02:00
parent 8e4067a1ed
commit cf91a3d812

View file

@ -1433,7 +1433,7 @@ public class LocalInsightPlugin extends PumpPluginBase implements Pump, Constrai
bolusID = insightDbHelper.getInsightBolusID(serial, event.getBolusID(), startTimestamp); // Line added to get id
if (event.getBolusType() == BolusType.STANDARD || event.getBolusType() == BolusType.MULTIWAVE) {
pumpSync.syncBolusWithPumpId(
bolusID.getTimestamp(),
startTimestamp,
event.getImmediateAmount(),
null,
bolusID.getId(),
@ -1443,9 +1443,9 @@ public class LocalInsightPlugin extends PumpPluginBase implements Pump, Constrai
if (event.getBolusType() == BolusType.EXTENDED || event.getBolusType() == BolusType.MULTIWAVE) {
if (event.getDuration() > 0 && profileFunction.getProfile(bolusID.getTimestamp()) != null)
pumpSync.syncExtendedBolusWithPumpId(
bolusID.getTimestamp(),
startTimestamp,
event.getExtendedAmount(),
T.mins(event.getDuration()).msecs(),
timestamp - startTimestamp,
isFakingTempsByExtendedBoluses(),
bolusID.getId(),
PumpType.ACCU_CHEK_INSIGHT,