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,23 +104,47 @@ void ProcessUI() {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TEMP_ADJ:
|
case TEMP_ADJ:
|
||||||
if (Buttons == BUT_A) {
|
if (systemSettings.flipDisplay) {
|
||||||
//A key pressed so we are moving down in temp
|
if (Buttons == BUT_B) {
|
||||||
|
//A key pressed so we are moving down in temp
|
||||||
|
|
||||||
if (systemSettings.SolderingTemp > 1000)
|
if (systemSettings.SolderingTemp > 1000)
|
||||||
systemSettings.SolderingTemp -= 100;
|
systemSettings.SolderingTemp -= 100;
|
||||||
} else if (Buttons == BUT_B) {
|
} else if (Buttons == BUT_A) {
|
||||||
//B key pressed so we are moving up in temp
|
//B key pressed so we are moving up in temp
|
||||||
if (systemSettings.SolderingTemp < 4500)
|
if (systemSettings.SolderingTemp < 4500)
|
||||||
systemSettings.SolderingTemp += 100;
|
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 {
|
} else {
|
||||||
//we check the timeout for how long the buttons have not been pushed
|
if (Buttons == BUT_A) {
|
||||||
//if idle for > 3 seconds then we return to soldering
|
//A key pressed so we are moving down in temp
|
||||||
//Or if both buttons pressed
|
|
||||||
if ((millis() - getLastButtonPress() > 2000)
|
if (systemSettings.SolderingTemp > 1000)
|
||||||
|| Buttons == (BUT_A | BUT_B)) {
|
systemSettings.SolderingTemp -= 100;
|
||||||
operatingMode = SOLDERING;
|
} else if (Buttons == BUT_B) {
|
||||||
saveSettings();
|
//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 ((millis() - getLastButtonPress() > 2000)
|
||||||
|
|| Buttons == (BUT_A | BUT_B)) {
|
||||||
|
operatingMode = SOLDERING;
|
||||||
|
saveSettings();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -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