Remove GetReservoirLevelCommand, will be a method in the future.

This commit is contained in:
Johannes Mockenhaupt 2017-09-07 09:25:20 +02:00
parent f4f91c0b85
commit cb24d13cae
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -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;
}
}