Fix reporting implicitly cancelled TBRs
This commit is contained in:
parent
77b359fa74
commit
ede70fdf6c
1 changed files with 3 additions and 3 deletions
|
@ -543,19 +543,19 @@ public class AapsOmnipodManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void reportImplicitlyCancelledTbr() {
|
private void reportImplicitlyCancelledTbr() {
|
||||||
//TreatmentsPlugin plugin = TreatmentsPlugin.getPlugin();
|
|
||||||
TreatmentsInterface plugin = activePlugin.getActiveTreatments();
|
TreatmentsInterface plugin = activePlugin.getActiveTreatments();
|
||||||
if (plugin.isTempBasalInProgress()) {
|
if (plugin.isTempBasalInProgress()) {
|
||||||
aapsLogger.debug(LTag.PUMP, "Reporting implicitly cancelled TBR to Treatments plugin");
|
aapsLogger.debug(LTag.PUMP, "Reporting implicitly cancelled TBR to Treatments plugin");
|
||||||
|
|
||||||
long time = System.currentTimeMillis() - 1000;
|
long time = System.currentTimeMillis() - 1000;
|
||||||
|
|
||||||
addSuccessToHistory(time, PodHistoryEntryType.CANCEL_TEMPORARY_BASAL_BY_DRIVER, null);
|
long pumpId = addSuccessToHistory(time, PodHistoryEntryType.CANCEL_TEMPORARY_BASAL_BY_DRIVER, null);
|
||||||
|
|
||||||
TemporaryBasal temporaryBasal = new TemporaryBasal(injector) //
|
TemporaryBasal temporaryBasal = new TemporaryBasal(injector) //
|
||||||
.date(time) //
|
.date(time) //
|
||||||
.duration(0) //
|
.duration(0) //
|
||||||
.source(Source.PUMP);
|
.source(Source.PUMP) //
|
||||||
|
.pumpId(pumpId);
|
||||||
|
|
||||||
plugin.addToHistoryTempBasal(temporaryBasal);
|
plugin.addToHistoryTempBasal(temporaryBasal);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue