-
-
Notifications
You must be signed in to change notification settings - Fork 716
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,45 @@ | ||
#include "OperatingModes.h" | ||
|
||
OperatingMode handleSettingsButtons(const ButtonState buttons, guiContext *cxt) { | ||
switch (buttons) { | ||
case BUTTON_NONE: | ||
// Do nothing | ||
break; | ||
case BUTTON_BOTH: | ||
break; | ||
|
||
case BUTTON_B_LONG: | ||
return OperatingMode::DebugMenuReadout; | ||
break; | ||
case BUTTON_F_LONG: | ||
#ifdef PROFILE_SUPPORT | ||
if (!isTipDisconnected()) { | ||
return OperatingMode::SolderingProfile; | ||
} | ||
#else | ||
return OperatingMode::TemperatureAdjust; | ||
#endif | ||
break; | ||
case BUTTON_F_SHORT: | ||
if (!isTipDisconnected()) { | ||
return OperatingMode::Soldering; | ||
} | ||
break; | ||
case BUTTON_B_SHORT: | ||
return OperatingMode::SettingsMenu; | ||
break; | ||
default: | ||
break; | ||
} | ||
return OperatingMode::HomeScreen; | ||
} | ||
|
||
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; | ||
return handleSettingsButtons(buttons, cxt); | ||
} |