fix(ui-new): on/off written On / Off everywhere, as every other value

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-10-06 14:12:27 +02:00
co-authored by Claude Opus 5.5
parent c4217d8632
commit 608c5b7dad
5 changed files with 16 additions and 15 deletions
+2 -2
View File
@@ -87,7 +87,7 @@ class GpioScreen : public UIScreen {
else if (mode == 2 || mode == 3) next = analog_ok ? 4 : 0;
else next = 0; // was Analog -> back to OFF
_task->setGpioMode(pin + 1, next);
const char* name = (next == 0) ? "OFF" : (next == 1) ? "Input" : (next == 2) ? "Output" : "Analog";
const char* name = (next == 0) ? "Off" : (next == 1) ? "Input" : (next == 2) ? "Output" : "Analog";
char msg[24];
snprintf(msg, sizeof(msg), "GPIO%d: %s", pin + 1, name);
_task->showAlert(msg, 800);
@@ -98,7 +98,7 @@ class GpioScreen : public UIScreen {
bool on = (gpioModeOf(pin) == 3);
_task->setGpioMode(pin + 1, on ? 2 : 3);
char msg[24];
snprintf(msg, sizeof(msg), "GPIO%d: %s", pin + 1, on ? "OFF" : "ON");
snprintf(msg, sizeof(msg), "GPIO%d: %s", pin + 1, on ? "Off" : "On");
_task->showAlert(msg, 800);
}