Fix buttons in left handed mode when user is changing the temperature.
As pointed out in #29 Clear the leftover temperature unit on the sleep screen.
This commit is contained in:
@@ -104,6 +104,29 @@ void ProcessUI() {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TEMP_ADJ:
|
case TEMP_ADJ:
|
||||||
|
if (systemSettings.flipDisplay) {
|
||||||
|
if (Buttons == BUT_B) {
|
||||||
|
//A key pressed so we are moving down in temp
|
||||||
|
|
||||||
|
if (systemSettings.SolderingTemp > 1000)
|
||||||
|
systemSettings.SolderingTemp -= 100;
|
||||||
|
} else if (Buttons == BUT_A) {
|
||||||
|
//B key pressed so we are moving up in temp
|
||||||
|
if (systemSettings.SolderingTemp < 4500)
|
||||||
|
systemSettings.SolderingTemp += 100;
|
||||||
|
} else {
|
||||||
|
//we check the timeout for how long the buttons have not been pushed
|
||||||
|
//if idle for > 3 seconds then we return to soldering
|
||||||
|
//Or if both buttons pressed
|
||||||
|
if (Buttons == (BUT_A | BUT_B)) {
|
||||||
|
operatingMode = STARTUP;
|
||||||
|
saveSettings();
|
||||||
|
} else if ((millis() - getLastButtonPress() > 2000)) {
|
||||||
|
operatingMode = SOLDERING;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if (Buttons == BUT_A) {
|
if (Buttons == BUT_A) {
|
||||||
//A key pressed so we are moving down in temp
|
//A key pressed so we are moving down in temp
|
||||||
|
|
||||||
@@ -123,6 +146,7 @@ void ProcessUI() {
|
|||||||
saveSettings();
|
saveSettings();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case SETTINGS:
|
case SETTINGS:
|
||||||
//Settings is the mode with the most logic
|
//Settings is the mode with the most logic
|
||||||
@@ -589,7 +613,7 @@ void DrawUI() {
|
|||||||
case SLEEP:
|
case SLEEP:
|
||||||
//The iron is in sleep temp mode
|
//The iron is in sleep temp mode
|
||||||
//Draw in temp and sleep
|
//Draw in temp and sleep
|
||||||
OLED_DrawString("SLP", 3);
|
OLED_DrawString("SLP ", 4);
|
||||||
drawTemp(temp, 4, systemSettings.temperatureRounding);
|
drawTemp(temp, 4, systemSettings.temperatureRounding);
|
||||||
OLED_BlankSlot(84, 96 - 85); //blank out after the temp
|
OLED_BlankSlot(84, 96 - 85); //blank out after the temp
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user