- 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 TBR is running we will cancel it.
if (tbrCurrent != null) { // if (tbrCurrent != null) {
if (isLoggingEnabled()) // if (isLoggingEnabled())
LOG.info(getLogPrefix() + "setTempBasalAbsolute - TBR running - so canceling it."); // LOG.info(getLogPrefix() + "setTempBasalAbsolute - TBR running - so canceling it.");
//
// CANCEL // // CANCEL
OmnipodUITask responseTask2 = omnipodUIComm.executeCommand(OmnipodCommandType.CancelTemporaryBasal); // OmnipodUITask responseTask2 = omnipodUIComm.executeCommand(OmnipodCommandType.CancelTemporaryBasal);
//
PumpEnactResult result = responseTask2.getResult(); // PumpEnactResult result = responseTask2.getResult();
//
if (result.success) { // if (result.success) {
if (isLoggingEnabled()) // if (isLoggingEnabled())
LOG.info(getLogPrefix() + "setTempBasalAbsolute - Current TBR cancelled."); // LOG.info(getLogPrefix() + "setTempBasalAbsolute - Current TBR cancelled.");
} else { // } else {
if (isLoggingEnabled()) // if (isLoggingEnabled())
LOG.error(getLogPrefix() + "setTempBasalAbsolute - Cancel TBR failed."); // LOG.error(getLogPrefix() + "setTempBasalAbsolute - Cancel TBR failed.");
//
finishAction("TBR"); // finishAction("TBR");
//
return result; // return result;
} // }
} // }
// now start new TBR // now start new TBR
OmnipodUITask responseTask = omnipodUIComm.executeCommand(OmnipodCommandType.SetTemporaryBasal, OmnipodUITask responseTask = omnipodUIComm.executeCommand(OmnipodCommandType.SetTemporaryBasal,