Merge pull request #558 from Philoul/AccuracyExtendedBolusDuration

Insight Driver accuracy of extended bolus duration
This commit is contained in:
Milos Kozak 2021-06-11 11:52:20 +02:00 committed by GitHub
commit 7c0ef9b156
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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(
bolusID.getTimestamp(), startTimestamp,
event.getImmediateAmount(), event.getImmediateAmount(),
null, null,
bolusID.getId(), 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.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(
bolusID.getTimestamp(), startTimestamp,
event.getExtendedAmount(), event.getExtendedAmount(),
T.mins(event.getDuration()).msecs(), timestamp - startTimestamp,
isFakingTempsByExtendedBoluses(), isFakingTempsByExtendedBoluses(),
bolusID.getId(), bolusID.getId(),
PumpType.ACCU_CHEK_INSIGHT, PumpType.ACCU_CHEK_INSIGHT,