FIXUP! Fix typo's
.
This commit is contained in:
@@ -105,6 +105,7 @@ void guiRenderLoop(void) {
|
||||
newMode = performCJCC(buttons, &context);
|
||||
break;
|
||||
case OperatingMode::SettingsMenu:
|
||||
newMode = gui_SettingsMenu(buttons, &context);
|
||||
break;
|
||||
case OperatingMode::InitialisationDone:
|
||||
newMode = handle_post_init_state();
|
||||
|
||||
@@ -18,7 +18,7 @@ OperatingMode showDebugMenu(const ButtonState buttons, guiContext *cxt) {
|
||||
// If device has validation code; then we want to take over both lines of the screen
|
||||
OLED::clearScreen(); // Ensure the buffer starts clean
|
||||
OLED::setCursor(0, 0); // Position the cursor at the 0,0 (top left)
|
||||
OLED::print(DebugMenu[screen], FontStyle::SMALL);
|
||||
OLED::print(DebugMenu[cxt->scratch_state.state1], FontStyle::SMALL);
|
||||
OLED::drawHex(getDeviceValidation(), FontStyle::SMALL, 8);
|
||||
OLED::setCursor(0, 8); // second line
|
||||
#endif
|
||||
|
||||
@@ -21,13 +21,10 @@ void renderHomeScreenAssets(void) {
|
||||
}
|
||||
|
||||
OperatingMode handleHomeButtons(const ButtonState buttons, guiContext *cxt) {
|
||||
if (buttons != BUTTON_NONE) {
|
||||
OLED::setDisplayState(OLED::DisplayState::ON);
|
||||
}
|
||||
if (buttons != BUTTON_NONE && cxt->scratch_state.state1 == 0) {
|
||||
return OperatingMode::HomeScreen; // Ignore button press
|
||||
} else {
|
||||
cxt->scratch_state.state1 == 1;
|
||||
cxt->scratch_state.state1 = 1;
|
||||
}
|
||||
switch (buttons) {
|
||||
case BUTTON_NONE:
|
||||
@@ -46,7 +43,6 @@ OperatingMode handleHomeButtons(const ButtonState buttons, guiContext *cxt) {
|
||||
}
|
||||
#else
|
||||
return OperatingMode::TemperatureAdjust;
|
||||
saveSettings();
|
||||
#endif
|
||||
break;
|
||||
case BUTTON_F_SHORT:
|
||||
|
||||
@@ -3,6 +3,8 @@ OperatingMode gui_SettingsMenu(const ButtonState buttons, guiContext *cxt) {
|
||||
// Render out the current settings menu
|
||||
// State 1 -> Root menu
|
||||
// State 2 -> Sub entry
|
||||
uint16_t *mainEntry = &(cxt->scratch_state.state1);
|
||||
uint16_t *subEntry = &(cxt->scratch_state.state2);
|
||||
|
||||
return OperatingMode::HomeScreen;
|
||||
}
|
||||
Reference in New Issue
Block a user