RuffyScripter: add toggle to avoid reading the quick info menu.

This commit is contained in:
Johannes Mockenhaupt 2018-01-28 15:45:57 +01:00
parent cd385a3217
commit 1bbc6d24c7
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -51,6 +51,8 @@ import de.jotomo.ruffyscripter.commands.SetTbrCommand;
* operations and are cleanly separated from the thread management, connection management etc
*/
public class RuffyScripter implements RuffyCommands {
private final boolean readQuickInfoMenu = true;
private static final Logger log = LoggerFactory.getLogger(RuffyScripter.class);
private IRuffyService ruffyService;
@ -215,7 +217,10 @@ public class RuffyScripter implements RuffyCommands {
@Override
public CommandResult readReservoirLevelAndLastBolus() {
return runCommand(new ReadReservoirLevelAndLastBolus());
if (readQuickInfoMenu) {
return runCommand(new ReadReservoirLevelAndLastBolus());
}
return runCommand(new ReadHistoryCommand(new PumpHistoryRequest().bolusHistory(PumpHistoryRequest.LAST)));
}
public void returnToRootMenu() {