Remove GetReservoirLevelCommand, will be a method in the future.
This commit is contained in:
parent
f4f91c0b85
commit
cb24d13cae
1 changed files with 0 additions and 28 deletions
|
@ -1,28 +0,0 @@
|
|||
package info.nightscout.androidaps.plugins.PumpCombo.scripter.commands;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class GetReservoirLevelCommand extends BaseCommand {
|
||||
@Override
|
||||
public CommandResult execute() {
|
||||
// TODO merge this into GetPumpHistory / GetFullPumpState; or maybe just have
|
||||
// GetPumpState and parameterize to just read the displayed menu, read reservoir level, read history?
|
||||
// TODO rough version, no error handling thought out
|
||||
|
||||
// turn into a method; bolus commands needs this as a precheck, parameterize GetPumpState command
|
||||
// to include reservoir level if desired
|
||||
scripter.verifyMenuIsDisplayed(MenuType.MAIN_MENU);
|
||||
scripter.pressCheckKey();
|
||||
scripter.waitForMenuToBeLeft(MenuType.MAIN_MENU);
|
||||
scripter.verifyMenuIsDisplayed(MenuType.QUICK_INFO);
|
||||
int remainingInsulin = ((Double) scripter.getCurrentMenu().getAttribute(MenuAttribute.REMAINING_INSULIN)).intValue();
|
||||
scripter.returnToMainMenu();
|
||||
return new CommandResult().success(true).enacted(false).reservoirLevel(remainingInsulin);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> validateArguments() {
|
||||
// TODO stub
|
||||
return null;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue