mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Unify behavior of menu items with questions/warnings (#157)
This commit is contained in:
committed by
Ben V. Brown
parent
4c0ba72542
commit
538a741912
@@ -176,7 +176,8 @@ static void waitForButtonPress() {
|
||||
lcd.refresh();
|
||||
}
|
||||
}
|
||||
static void waitForButtonPressOrTimeout(uint32_t timeout) {
|
||||
|
||||
void waitForButtonPressOrTimeout(uint32_t timeout) {
|
||||
timeout += HAL_GetTick();
|
||||
// Make timeout our exit value
|
||||
for (;;) {
|
||||
@@ -306,7 +307,6 @@ static void gui_settingsMenu() {
|
||||
// Draw the settings menu and provide iteration support etc
|
||||
uint8_t currentScreen = 0;
|
||||
uint32_t autoRepeatTimer = 0;
|
||||
settingsResetRequest = false;
|
||||
bool earlyExit = false;
|
||||
uint32_t descriptionStart = 0;
|
||||
while ((settingsMenu[currentScreen].incrementHandler.func != NULL) &&
|
||||
@@ -321,7 +321,7 @@ static void gui_settingsMenu() {
|
||||
} else {
|
||||
// Draw description
|
||||
// draw string starting from descriptionOffset
|
||||
int16_t maxOffset = strlen(settingsMenu[currentScreen].description) + 5;
|
||||
int16_t maxOffset = strlen(settingsMenu[currentScreen].description) + 7;
|
||||
if (descriptionStart == 0) descriptionStart = HAL_GetTick();
|
||||
|
||||
int16_t descriptionOffset =
|
||||
@@ -374,9 +374,10 @@ static void gui_settingsMenu() {
|
||||
osDelay(20);
|
||||
HAL_IWDG_Refresh(&hiwdg);
|
||||
}
|
||||
if (settingsResetRequest) resetSettings();
|
||||
|
||||
saveSettings();
|
||||
}
|
||||
|
||||
static int gui_showTipTempWarning() {
|
||||
for (;;) {
|
||||
uint16_t tipTemp = tipMeasurementToC(getTipRawTemp(0));
|
||||
|
||||
Reference in New Issue
Block a user