- remove cancel TBR from OmnipoPump code

This commit is contained in:
Andy Rozman 2019-12-30 21:25:35 +01:00
parent 1668b2634c
commit 8610f47cdf

View file

@ -705,27 +705,27 @@ public class OmnipodPumpPlugin extends PumpPluginAbstract implements OmnipodPump
}
// if TBR is running we will cancel it.
if (tbrCurrent != null) {
if (isLoggingEnabled())
LOG.info(getLogPrefix() + "setTempBasalAbsolute - TBR running - so canceling it.");
// CANCEL
OmnipodUITask responseTask2 = omnipodUIComm.executeCommand(OmnipodCommandType.CancelTemporaryBasal);
PumpEnactResult result = responseTask2.getResult();
if (result.success) {
if (isLoggingEnabled())
LOG.info(getLogPrefix() + "setTempBasalAbsolute - Current TBR cancelled.");
} else {
if (isLoggingEnabled())
LOG.error(getLogPrefix() + "setTempBasalAbsolute - Cancel TBR failed.");
finishAction("TBR");
return result;
}
}
// if (tbrCurrent != null) {
// if (isLoggingEnabled())
// LOG.info(getLogPrefix() + "setTempBasalAbsolute - TBR running - so canceling it.");
//
// // CANCEL
// OmnipodUITask responseTask2 = omnipodUIComm.executeCommand(OmnipodCommandType.CancelTemporaryBasal);
//
// PumpEnactResult result = responseTask2.getResult();
//
// if (result.success) {
// if (isLoggingEnabled())
// LOG.info(getLogPrefix() + "setTempBasalAbsolute - Current TBR cancelled.");
// } else {
// if (isLoggingEnabled())
// LOG.error(getLogPrefix() + "setTempBasalAbsolute - Cancel TBR failed.");
//
// finishAction("TBR");
//
// return result;
// }
// }
// now start new TBR
OmnipodUITask responseTask = omnipodUIComm.executeCommand(OmnipodCommandType.SetTemporaryBasal,