profile mode is optional
This commit is contained in:
@@ -55,8 +55,12 @@ void drawHomeScreen(bool buttonLockout) {
|
||||
showDebugMenu();
|
||||
break;
|
||||
case BUTTON_F_LONG:
|
||||
#ifdef PROFILE_MODE
|
||||
// todo: add profile mode
|
||||
#else
|
||||
gui_solderingTempAdjust();
|
||||
saveSettings();
|
||||
#endif
|
||||
break;
|
||||
case BUTTON_F_SHORT:
|
||||
if (!isTipDisconnected()) {
|
||||
|
||||
@@ -4,23 +4,31 @@ void gui_solderingTempAdjust(void) {
|
||||
currentTempTargetDegC = 0; // Turn off heater while adjusting temp
|
||||
TickType_t autoRepeatTimer = 0;
|
||||
uint8_t autoRepeatAcceleration = 0;
|
||||
#ifndef PROFILE_MODE
|
||||
bool waitForRelease = false;
|
||||
ButtonState buttons = getButtonState();
|
||||
|
||||
if (buttons != BUTTON_NONE) {
|
||||
// Temp adjust entered by long-pressing F button.
|
||||
waitForRelease = true;
|
||||
}
|
||||
#else
|
||||
ButtonState buttons;
|
||||
#endif
|
||||
|
||||
for (;;) {
|
||||
OLED::setCursor(0, 0);
|
||||
OLED::clearScreen();
|
||||
buttons = getButtonState();
|
||||
if (buttons) {
|
||||
lastChange = xTaskGetTickCount();
|
||||
#ifndef PROFILE_MODE
|
||||
if (waitForRelease) {
|
||||
buttons = BUTTON_NONE;
|
||||
}
|
||||
lastChange = xTaskGetTickCount();
|
||||
} else {
|
||||
waitForRelease = false;
|
||||
#endif
|
||||
}
|
||||
int16_t delta = 0;
|
||||
switch (buttons) {
|
||||
|
||||
Reference in New Issue
Block a user