SetBasalProfileCommand: abort if active BR is != 1.
This commit is contained in:
parent
728abbe224
commit
8089825c4c
1 changed files with 4 additions and 0 deletions
|
@ -13,6 +13,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import de.jotomo.ruffy.spi.BasalProfile;
|
||||
import de.jotomo.ruffy.spi.PumpState;
|
||||
|
||||
public class SetBasalProfileCommand extends BaseCommand {
|
||||
private static final Logger log = LoggerFactory.getLogger(SetBasalProfileCommand.class);
|
||||
|
@ -26,6 +27,9 @@ public class SetBasalProfileCommand extends BaseCommand {
|
|||
@Override
|
||||
public void execute() {
|
||||
scripter.verifyMenuIsDisplayed(MenuType.MAIN_MENU);
|
||||
if (scripter.readPumpStateInternal().unsafeUsageDetected == PumpState.UNSUPPORTED_BASAL_RATE_PROFILE) {
|
||||
throw new CommandException("Active basal rate profile != 1");
|
||||
}
|
||||
scripter.navigateToMenu(MenuType.BASAL_1_MENU);
|
||||
scripter.verifyMenuIsDisplayed(MenuType.BASAL_1_MENU);
|
||||
scripter.pressCheckKey();
|
||||
|
|
Loading…
Reference in a new issue