Replace calculated StartTimestamp from pump by Android Timestamp if bolus launched from AAPS

This commit is contained in:
Philoul 2021-10-01 17:04:03 +02:00
parent 14ca67b488
commit b35828cd54

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