diff --git a/examples/companion_radio/NodePrefs.h b/examples/companion_radio/NodePrefs.h index 334774d6..6c982497 100644 --- a/examples/companion_radio/NodePrefs.h +++ b/examples/companion_radio/NodePrefs.h @@ -575,7 +575,7 @@ struct NodePrefs { // persisted to file return S[idx < GPS_AVG_COUNT ? idx : 0]; } static const char* gpsAvgLabel(uint8_t idx) { - static const char* L[GPS_AVG_COUNT] = { "OFF", "5s", "10s", "30s" }; + static const char* L[GPS_AVG_COUNT] = { "Off", "5s", "10s", "30s" }; return L[idx < GPS_AVG_COUNT ? idx : 0]; } @@ -586,7 +586,7 @@ struct NodePrefs { // persisted to file return S[idx < TRAIL_AUTOPAUSE_COUNT ? idx : 0]; } static const char* trailAutoPauseLabel(uint8_t idx) { - static const char* L[TRAIL_AUTOPAUSE_COUNT] = { "OFF", "1m", "2m", "5m" }; + static const char* L[TRAIL_AUTOPAUSE_COUNT] = { "Off", "1m", "2m", "5m" }; return L[idx < TRAIL_AUTOPAUSE_COUNT ? idx : 0]; } // Movement under this many metres counts as "stationary" for auto-pause. diff --git a/examples/companion_radio/ui-new/AdminScreen.h b/examples/companion_radio/ui-new/AdminScreen.h index 2d7ed42a..bf93153d 100644 --- a/examples/companion_radio/ui-new/AdminScreen.h +++ b/examples/companion_radio/ui-new/AdminScreen.h @@ -103,7 +103,7 @@ class AdminScreen : public UIScreen { // Right-column text for the row in _value_editing (freq draws its own editor). void formatEditValue(const admin::Field& f, char* buf, size_t n) const { switch (f.kind) { - case admin::K_ONOFF: snprintf(buf, n, "%s", S().value != 0 ? "ON" : "OFF"); break; + case admin::K_ONOFF: snprintf(buf, n, "%s", S().value != 0 ? "On" : "Off"); break; case admin::K_RADIO_BW: snprintf(buf, n, "%.1f", S().radio_bw); break; case admin::K_RADIO_SF: snprintf(buf, n, "%d", (int)S().radio_sf); break; case admin::K_RADIO_CR: snprintf(buf, n, "%d", (int)S().radio_cr); break; diff --git a/examples/companion_radio/ui-new/GpioScreen.h b/examples/companion_radio/ui-new/GpioScreen.h index 9a0f5b3f..8a3e1de0 100644 --- a/examples/companion_radio/ui-new/GpioScreen.h +++ b/examples/companion_radio/ui-new/GpioScreen.h @@ -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); } diff --git a/examples/companion_radio/ui-new/InfoKit.h b/examples/companion_radio/ui-new/InfoKit.h index 28f3ebd9..07719988 100644 --- a/examples/companion_radio/ui-new/InfoKit.h +++ b/examples/companion_radio/ui-new/InfoKit.h @@ -194,13 +194,14 @@ inline int big(DisplayDriver& d, int x, int y, const char* value, const char* un } inline int bigH(DisplayDriver& d) { return 2 * d.getLineHeight(); } -// An on/off state, right edge at x_right on a text line at y: the words ON / -// OFF. (A drawn pill switch read as a battery on the small screens.) `inv` -// draws it in a selected row's colours (dark on the light bar). -inline int switchW(DisplayDriver& d) { return d.getTextWidth("OFF"); } +// An on/off state, right edge at x_right on a text line at y: the words On / +// Off, written as every other value. (A drawn pill switch read as a battery +// on the small screens.) `inv` draws it in a selected row's colours (dark on +// the light bar). +inline int switchW(DisplayDriver& d) { return d.getTextWidth("Off"); } inline void toggle(DisplayDriver& d, int x_right, int y, bool on, bool inv = false) { d.setColor(inv ? DisplayDriver::DARK : DisplayDriver::LIGHT); - d.drawTextRightAlign(x_right, y, on ? "ON" : "OFF"); + d.drawTextRightAlign(x_right, y, on ? "On" : "Off"); } // ── List rows (call after drawRowSelection(); text is already in the row's ink) @@ -219,8 +220,8 @@ inline int valueRow(DisplayDriver& d, int y, const char* label, const char* valu const int r = d.drawTextEllipsized(lx, y, right - lx, value, sel); return sel && r > 0 ? r : 0; } -// A row from a screen's value formatter: exactly "ON" / "OFF" is a yes/no -// setting and gets switchRow(); anything else (an option that can be "Off" +// A row from a screen's value formatter: exactly "ON" / "OFF" (the marker, not +// what's shown) is a yes/no setting and gets switchRow(); anything else (an option that can be "Off" // among numbers included) is a value. Returns valueRow()'s marquee delay. inline void switchRow(DisplayDriver& d, int y, const char* label, bool on, bool sel, int reserve, int x0 = 2); inline int listRow(DisplayDriver& d, int y, const char* label, const char* value, bool sel, diff --git a/examples/companion_radio/ui-new/UITask.cpp b/examples/companion_radio/ui-new/UITask.cpp index 25c8e7c6..c522e807 100644 --- a/examples/companion_radio/ui-new/UITask.cpp +++ b/examples/companion_radio/ui-new/UITask.cpp @@ -2663,7 +2663,7 @@ extern "C" EMSCRIPTEN_KEEPALIVE int sim_buzzer_get_volume() { // real toggle does: buzzer.quiet(), writes NodePrefs.buzzer_quiet, clears // buzzer_auto (manual mute always wins over auto-mute-on-BT-connect, // same as pressing it on the device would), the_mesh.savePrefs(), and -// the real on-screen "Buzzer: ON/OFF" alert -- so muting from the host +// the real on-screen "Buzzer: On/Off" alert -- so muting from the host // page's button is visibly the same event as muting from the keypad. extern "C" EMSCRIPTEN_KEEPALIVE void sim_buzzer_toggle_quiet() { if (g_sim_ui_task_for_js) g_sim_ui_task_for_js->toggleBuzzer(); @@ -3895,7 +3895,7 @@ void UITask::toggleBuzzer() { soundctl::setMode(_node_prefs, buzzer, on ? soundctl::MODE_ON : soundctl::MODE_OFF, isClientConnected()); if (on) notify(UIEventType::ack); the_mesh.savePrefs(); - showAlert(buzzer.isQuiet() ? "Buzzer: OFF" : "Buzzer: ON", 800); + showAlert(buzzer.isQuiet() ? "Buzzer: Off" : "Buzzer: On", 800); _next_refresh = 0; #endif } @@ -3915,7 +3915,7 @@ void UITask::cycleBuzzerMode() { mode = (mode + 1) % soundctl::MODE_COUNT; // ON → OFF → Auto → ON soundctl::setMode(_node_prefs, buzzer, (uint8_t)mode, isClientConnected()); if (mode == soundctl::MODE_ON) notify(UIEventType::ack); - static const char* labels[] = { "Buzzer: ON", "Buzzer: OFF", "Buzzer: Auto" }; + static const char* labels[] = { "Buzzer: On", "Buzzer: Off", "Buzzer: Auto" }; showAlert(labels[mode], 800); _next_refresh = 0; #endif