Check result.success when hard cancelling TBR.
(cherry picked from commit 654f984)
This commit is contained in:
parent
b435bb3cd5
commit
6fb5f5bad4
1 changed files with 3 additions and 0 deletions
|
@ -792,6 +792,9 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
|
||||||
if (enforceNew) {
|
if (enforceNew) {
|
||||||
log.debug("cancelTempBasal: hard-cancelling TBR since force requested");
|
log.debug("cancelTempBasal: hard-cancelling TBR since force requested");
|
||||||
CommandResult commandResult = runCommand(MainApp.gs(R.string.combo_pump_action_cancelling_tbr), 2, ruffyScripter::cancelTbr);
|
CommandResult commandResult = runCommand(MainApp.gs(R.string.combo_pump_action_cancelling_tbr), 2, ruffyScripter::cancelTbr);
|
||||||
|
if (!commandResult.success) {
|
||||||
|
return new PumpEnactResult().success(false).enacted(false);
|
||||||
|
}
|
||||||
if (!commandResult.state.tbrActive) {
|
if (!commandResult.state.tbrActive) {
|
||||||
TemporaryBasal tempBasal = new TemporaryBasal();
|
TemporaryBasal tempBasal = new TemporaryBasal();
|
||||||
tempBasal.date = commandResult.state.timestamp;
|
tempBasal.date = commandResult.state.timestamp;
|
||||||
|
|
Loading…
Reference in a new issue