- fixed cancel Tbr reporting
This commit is contained in:
parent
f110ab2ba3
commit
b463f915e1
1 changed files with 8 additions and 4 deletions
|
@ -499,12 +499,16 @@ public class AapsOmnipodManager implements OmnipodCommunicationManagerInterface
|
||||||
LOG.debug("Reporting implicitly cancelled TBR to Treatments plugin");
|
LOG.debug("Reporting implicitly cancelled TBR to Treatments plugin");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long time = System.currentTimeMillis();
|
||||||
|
|
||||||
|
addSuccessToHistory(time, PodHistoryEntryType.CancelTemporaryBasalForce, null);
|
||||||
|
|
||||||
TemporaryBasal temporaryBasal = new TemporaryBasal() //
|
TemporaryBasal temporaryBasal = new TemporaryBasal() //
|
||||||
.date(System.currentTimeMillis()) //
|
.date(time) //
|
||||||
.duration(0) //
|
.duration(0) //
|
||||||
// TODO bs should be Source.PUMP imo, but that doesn't work:
|
.pumpId(pumpStatus.tempBasalPumpId)
|
||||||
// it says a TEMPBASAL record already exists
|
.source(Source.PUMP);
|
||||||
.source(Source.USER);
|
|
||||||
plugin.addToHistoryTempBasal(temporaryBasal);
|
plugin.addToHistoryTempBasal(temporaryBasal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue