From 9aff10537e06f50f265b692a73a028ec07e826e5 Mon Sep 17 00:00:00 2001 From: Carlos Rafael Giani Date: Fri, 4 Nov 2022 20:42:50 +0100 Subject: [PATCH] comboctl-main: Directly push MENU button to switch to TBR duration screen There's no reason to use the full navigation function to switch from the TBR percentage to the TBR duration screen, since these are next to each other, and switching over is done by pressing MENU once. Signed-off-by: Carlos Rafael Giani --- .../commonMain/kotlin/info/nightscout/comboctl/main/Pump.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pump/combov2/comboctl/src/commonMain/kotlin/info/nightscout/comboctl/main/Pump.kt b/pump/combov2/comboctl/src/commonMain/kotlin/info/nightscout/comboctl/main/Pump.kt index bfcd1b1e1a..c48931ca90 100644 --- a/pump/combov2/comboctl/src/commonMain/kotlin/info/nightscout/comboctl/main/Pump.kt +++ b/pump/combov2/comboctl/src/commonMain/kotlin/info/nightscout/comboctl/main/Pump.kt @@ -3064,7 +3064,9 @@ class Pump( setTbrProgressReporter.setCurrentProgressStage(RTCommandProgressStage.SettingTBRDuration(0)) - navigateToRTScreen(rtNavigationContext, ParsedScreen.TemporaryBasalRateDurationScreen::class, pumpSuspended) + // Now move to the duration screen by pressing MENU. + rtNavigationContext.shortPressButton(RTNavigationButton.MENU) + waitUntilScreenAppears(rtNavigationContext, ParsedScreen.TemporaryBasalRateDurationScreen::class) adjustQuantityOnScreen( rtNavigationContext,