1
0
forked from me/IronOS

fixed detailed view for lefties

This commit is contained in:
discip
2022-01-06 02:13:38 +01:00
committed by GitHub
parent 2cac11fdda
commit 761bafad83

View File

@@ -508,7 +508,7 @@ static void gui_solderingMode(uint8_t jumpToSleep) {
case BUTTON_B_LONG: case BUTTON_B_LONG:
case BUTTON_F_SHORT: case BUTTON_F_SHORT:
case BUTTON_B_SHORT: case BUTTON_B_SHORT:
// Do nothing and display a lock warming // Do nothing and display a lock warning
warnUser(translatedString(Tr->WarningKeysLockedString), TICKS_SECOND / 2); warnUser(translatedString(Tr->WarningKeysLockedString), TICKS_SECOND / 2);
break; break;
default: default:
@@ -552,7 +552,15 @@ static void gui_solderingMode(uint8_t jumpToSleep) {
} }
} }
// else we update the screen information // else we update the screen information
OLED::setCursor(0, 0); #ifdef OLED_FLIP
if (!OLED::getRotation()) {
#else
if (OLED::getRotation()) {
#endif
OLED::setCursor(50, 0);
} else {
OLED::setCursor(-1, 0);
}
OLED::clearScreen(); OLED::clearScreen();
// Draw in the screen details // Draw in the screen details
if (getSettingValue(SettingsOptions::DetailedSoldering)) { if (getSettingValue(SettingsOptions::DetailedSoldering)) {
@@ -560,23 +568,55 @@ static void gui_solderingMode(uint8_t jumpToSleep) {
#ifndef NO_SLEEP_MODE #ifndef NO_SLEEP_MODE
if (getSettingValue(SettingsOptions::Sensitivity) && getSettingValue(SettingsOptions::SleepTime)) { if (getSettingValue(SettingsOptions::Sensitivity) && getSettingValue(SettingsOptions::SleepTime)) {
OLED::setCursor(47, 0); #ifdef OLED_FLIP
if (!OLED::getRotation()) {
#else
if (OLED::getRotation()) {
#endif
OLED::setCursor(32, 0);
} else {
OLED::setCursor(47, 0);
}
display_countdown(getSleepTimeout()); display_countdown(getSleepTimeout());
} }
#endif #endif
if (boostModeOn) { if (boostModeOn) {
OLED::setCursor(54, 8); #ifdef OLED_FLIP
if (!OLED::getRotation()) {
#else
if (OLED::getRotation()) {
#endif
OLED::setCursor(38, 8);
} else {
OLED::setCursor(55, 8);
}
OLED::print(SymbolPlus, FontStyle::SMALL); OLED::print(SymbolPlus, FontStyle::SMALL);
} }
OLED::setCursor(67, 0); #ifdef OLED_FLIP
if (!OLED::getRotation()) {
#else
if (OLED::getRotation()) {
#endif
OLED::setCursor(0, 0);
} else {
OLED::setCursor(67, 0);
}
OLED::printNumber(x10WattHistory.average() / 10, 2, FontStyle::SMALL); OLED::printNumber(x10WattHistory.average() / 10, 2, FontStyle::SMALL);
OLED::print(SymbolDot, FontStyle::SMALL); OLED::print(SymbolDot, FontStyle::SMALL);
OLED::printNumber(x10WattHistory.average() % 10, 1, FontStyle::SMALL); OLED::printNumber(x10WattHistory.average() % 10, 1, FontStyle::SMALL);
OLED::print(SymbolWatts, FontStyle::SMALL); OLED::print(SymbolWatts, FontStyle::SMALL);
OLED::setCursor(67, 8); #ifdef OLED_FLIP
if (!OLED::getRotation()) {
#else
if (OLED::getRotation()) {
#endif
OLED::setCursor(0, 8);
} else {
OLED::setCursor(67, 8);
}
printVoltage(); printVoltage();
OLED::print(SymbolVolts, FontStyle::SMALL); OLED::print(SymbolVolts, FontStyle::SMALL);
} else { } else {
@@ -910,28 +950,83 @@ void startGUITask(void const *argument) {
} }
// Clear the lcd buffer // Clear the lcd buffer
OLED::clearScreen(); OLED::clearScreen();
OLED::setCursor(0, 0); #ifdef OLED_FLIP
if (!OLED::getRotation()) {
#else
if (OLED::getRotation()) {
#endif
OLED::setCursor(50, 0);
} else {
OLED::setCursor(-1, 0);
}
if (getSettingValue(SettingsOptions::DetailedIDLE)) { if (getSettingValue(SettingsOptions::DetailedIDLE)) {
if (isTipDisconnected()) { if (isTipDisconnected()) {
OLED::drawArea(0, 0, 41, 16, disconnectedTipIcon); #ifdef OLED_FLIP
if (!OLED::getRotation()) {
#else
if (OLED::getRotation()) {
#endif
// in right handed mode we want to draw over the first part
OLED::drawArea(55, 0, 41, 16, disconnectedTipIconFlip);
} else {
OLED::drawArea(0, 0, 41, 16, disconnectedTipIcon);
}
#ifdef OLED_FLIP
if (!OLED::getRotation()) {
#else
if (OLED::getRotation()) {
#endif
OLED::setCursor(-1, 0);
} else {
OLED::setCursor(42, 0);
}
uint32_t Vlt = getInputVoltageX10(getSettingValue(SettingsOptions::VoltageDiv), 0);
OLED::printNumber(Vlt / 10, 2, FontStyle::LARGE);
OLED::print(SymbolDot, FontStyle::LARGE);
OLED::printNumber(Vlt % 10, 1, FontStyle::LARGE);
#ifdef OLED_FLIP
if (!OLED::getRotation()) {
#else
if (OLED::getRotation()) {
#endif
OLED::setCursor(48, 8);
} else {
OLED::setCursor(91, 8);
}
OLED::print(SymbolVolts, FontStyle::SMALL);
} else { } else {
if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (tipTemp > 55) && (xTaskGetTickCount() % 1000 < 300))) if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (tipTemp > 55) && (xTaskGetTickCount() % 1000 < 300)))
// Blink temp if setting enable and temp < 55° // Blink temp if setting enable and temp < 55°
// 1000 tick/sec // 1000 tick/sec
// OFF 300ms ON 700ms // OFF 300ms ON 700ms
gui_drawTipTemp(true, FontStyle::LARGE); // draw in the temp gui_drawTipTemp(true, FontStyle::LARGE); // draw in the temp
OLED::setCursor(73, 0); // top right #ifdef OLED_FLIP
if (!OLED::getRotation()) {
#else
if (OLED::getRotation()) {
#endif
OLED::setCursor(6, 0);
} else {
OLED::setCursor(73, 0); // top right
}
OLED::printNumber(getSettingValue(SettingsOptions::SolderingTemp), 3, FontStyle::SMALL); // draw set temp OLED::printNumber(getSettingValue(SettingsOptions::SolderingTemp), 3, FontStyle::SMALL); // draw set temp
if (getSettingValue(SettingsOptions::TemperatureInF)) if (getSettingValue(SettingsOptions::TemperatureInF))
OLED::print(SymbolDegF, FontStyle::SMALL); OLED::print(SymbolDegF, FontStyle::SMALL);
else else
OLED::print(SymbolDegC, FontStyle::SMALL); OLED::print(SymbolDegC, FontStyle::SMALL);
#ifdef OLED_FLIP
if (!OLED::getRotation()) {
#else
if (OLED::getRotation()) {
#endif
OLED::setCursor(0, 8);
} else {
OLED::setCursor(67, 8); // bottom right
}
printVoltage(); // draw voltage then symbol (v)
OLED::print(SymbolVolts, FontStyle::SMALL);
} }
OLED::setCursor(67, 8); // bottom right
printVoltage(); // draw voltage then symbol (v)
OLED::print(SymbolVolts, FontStyle::SMALL);
} else { } else {
#ifdef OLED_FLIP #ifdef OLED_FLIP
if (!OLED::getRotation()) { if (!OLED::getRotation()) {
@@ -967,7 +1062,6 @@ void startGUITask(void const *argument) {
// in right handed mode we want to draw over the first part // in right handed mode we want to draw over the first part
OLED::fillArea(55, 0, 41, 16, 0); // clear the area for the temp OLED::fillArea(55, 0, 41, 16, 0); // clear the area for the temp
OLED::setCursor(56, 0); OLED::setCursor(56, 0);
} else { } else {
OLED::fillArea(0, 0, 41, 16, 0); // clear the area OLED::fillArea(0, 0, 41, 16, 0); // clear the area
OLED::setCursor(0, 0); OLED::setCursor(0, 0);
@@ -987,7 +1081,6 @@ void startGUITask(void const *argument) {
#endif #endif
// in right handed mode we want to draw over the first part // in right handed mode we want to draw over the first part
OLED::drawArea(55, 0, 41, 16, disconnectedTipIconFlip); OLED::drawArea(55, 0, 41, 16, disconnectedTipIconFlip);
} else { } else {
OLED::drawArea(0, 0, 41, 16, disconnectedTipIcon); OLED::drawArea(0, 0, 41, 16, disconnectedTipIcon);
} }