Small robustness improvements.
This commit is contained in:
parent
a95a00377b
commit
5e79900411
|
@ -219,7 +219,6 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
|
|||
|
||||
@Override
|
||||
public synchronized int setNewBasalProfile(Profile profile) {
|
||||
|
||||
if (!isInitialized()) {
|
||||
log.error("setNewBasalProfile not initialized");
|
||||
Notification notification = new Notification(Notification.PROFILE_NOT_SET_NOT_INITIALIZED, MainApp.sResources.getString(R.string.pumpNotInitializedProfileNotSet), Notification.URGENT);
|
||||
|
@ -234,6 +233,7 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
|
|||
MainApp.bus().post(new EventDismissNotification(Notification.FAILED_UDPATE_PROFILE));
|
||||
return PumpInterface.NOT_NEEDED;
|
||||
}
|
||||
|
||||
CommandResult setResult = runCommand(MainApp.sResources.getString(R.string.combo_activity_setting_basal_profile), 2,
|
||||
() -> ruffyScripter.setBasalProfile(requestedBasalProfile));
|
||||
if (!setResult.success) {
|
||||
|
|
|
@ -16,6 +16,7 @@ public class ReadBasalProfileCommand extends BaseCommand {
|
|||
|
||||
@Override
|
||||
public void execute() {
|
||||
scripter.verifyMenuIsDisplayed(MenuType.MAIN_MENU);
|
||||
scripter.navigateToMenu(MenuType.BASAL_1_MENU);
|
||||
scripter.verifyMenuIsDisplayed(MenuType.BASAL_1_MENU);
|
||||
scripter.pressCheckKey();
|
||||
|
|
|
@ -37,6 +37,7 @@ public class ReadHistoryCommand extends BaseCommand {
|
|||
if (request.bolusHistory != PumpHistoryRequest.SKIP
|
||||
|| request.tbrHistory != PumpHistoryRequest.SKIP
|
||||
|| request.pumpErrorHistory != PumpHistoryRequest.SKIP) {
|
||||
scripter.verifyMenuIsDisplayed(MenuType.MAIN_MENU);
|
||||
scripter.navigateToMenu(MenuType.MY_DATA_MENU);
|
||||
scripter.verifyMenuIsDisplayed(MenuType.MY_DATA_MENU);
|
||||
scripter.pressCheckKey();
|
||||
|
|
|
@ -25,6 +25,7 @@ public class SetBasalProfileCommand extends BaseCommand {
|
|||
|
||||
@Override
|
||||
public void execute() {
|
||||
scripter.verifyMenuIsDisplayed(MenuType.MAIN_MENU);
|
||||
scripter.navigateToMenu(MenuType.BASAL_1_MENU);
|
||||
scripter.verifyMenuIsDisplayed(MenuType.BASAL_1_MENU);
|
||||
scripter.pressCheckKey();
|
||||
|
@ -66,8 +67,6 @@ public class SetBasalProfileCommand extends BaseCommand {
|
|||
|
||||
// confirm entered basal rate
|
||||
scripter.pressCheckKey();
|
||||
|
||||
scripter.returnToRootMenu();
|
||||
scripter.verifyRootMenuIsDisplayed();
|
||||
|
||||
result.success(true).basalProfile(basalProfile);
|
||||
|
|
Loading…
Reference in a new issue