diff --git a/source/Core/Threads/GUIRendering.md b/source/Core/Threads/GUIRendering.md index 3e794049..8f6fcee1 100644 --- a/source/Core/Threads/GUIRendering.md +++ b/source/Core/Threads/GUIRendering.md @@ -24,7 +24,13 @@ The use of these gives a notion of "direction" when navigating the menu. │Soldering Mode│ │ │ │ │ │ │ │ OR ├───────────┤Home Menu ├───────────┤Settings Main Menu├───────────┤Settings sub menu│ │Reflow Mode│ │ │ │ │ │ │ -└──────────────┘ └──────────┘ └──────────────────┘ └─────────────────┘ +└──────────────┘ └──────────┘ └──────────────────┘ └─────────┬───────┘ + │ + ┌─────────┴───────┐ + │ │ + │Settings sub menu│ + │ │ + └─────────────────┘ ``` The downside of supporting transitions is that for these to work, the code should render the screen _first_ then return the new state. diff --git a/source/Core/Threads/OperatingModes/SettingsMenu.cpp b/source/Core/Threads/OperatingModes/SettingsMenu.cpp index 9b33c7ec..fcb7447b 100644 --- a/source/Core/Threads/OperatingModes/SettingsMenu.cpp +++ b/source/Core/Threads/OperatingModes/SettingsMenu.cpp @@ -170,7 +170,7 @@ OperatingMode gui_SettingsMenu(const ButtonState buttons, guiContext *cxt) { case BUTTON_F_LONG: if (xTaskGetTickCount() + (*autoRepeatAcceleration) > (*autoRepeatTimer) + PRESS_ACCEL_INTERVAL_MAX) { if (callIncrementHandler()) { - (*autoRepeatTimer) = 1000; + (*autoRepeatTimer) = TICKS_SECOND * 2; } else { (*autoRepeatTimer) = 0; } @@ -212,6 +212,9 @@ OperatingMode gui_SettingsMenu(const ButtonState buttons, guiContext *cxt) { default: break; } + if ((PRESS_ACCEL_INTERVAL_MAX - (*autoRepeatAcceleration)) < PRESS_ACCEL_INTERVAL_MIN) { + (*autoRepeatAcceleration) = PRESS_ACCEL_INTERVAL_MAX - PRESS_ACCEL_INTERVAL_MIN; + } // Otherwise we stay put for next render iteration return newMode;