diff --git a/README.md b/README.md index d6ddb531..4ba215e5 100644 --- a/README.md +++ b/README.md @@ -284,6 +284,7 @@ Press **S** from the home screen to open settings. On first boot (when the devic | Msg Rcvd LED Pulse | Toggle keyboard backlight flash on new message (Enter to toggle) | | GPS Baud Rate | A / D to cycle (Default 38400 / 4800 / 9600 / 19200 / 38400 / 57600 / 115200), Enter to confirm. **Requires reboot to take effect.** | | Path Hash Mode | W / S to cycle (1-byte / 2-byte / 3-byte), Enter to confirm | +| Dark Mode | Toggle inverted display — white text on black background (Enter to toggle) | | Contacts >> | Opens the Contacts sub-screen (see below) | | Channels >> | Opens the Channels sub-screen (see below) | | Device Info | Public key and firmware version (read-only) | @@ -444,12 +445,12 @@ Tap keys to type. Tap **Enter** to submit, or press the **Boot button** to cance ### Display Settings -The T5S3 Settings screen includes two additional options not available on the T-Deck Pro: +The T5S3 Settings screen includes one additional display option not available on the T-Deck Pro: | Setting | Description | |---------|-------------| -| **Dark Mode** | Inverts the display — white text on black background. Tap to toggle on/off. | -| **Portrait Mode** | Rotates the display 90° from landscape (960×540) to portrait (540×960). Touch coordinates are automatically remapped. Text reader layout recalculates on orientation change. | +| **Dark Mode** | Inverts the display — white text on black background. Tap to toggle on/off. Available on both T-Deck Pro and T5S3. | +| **Portrait Mode** | Rotates the display 90° from landscape (960×540) to portrait (540×960). Touch coordinates are automatically remapped. Text reader layout recalculates on orientation change. T5S3 only. | These settings are persisted and survive reboots. diff --git a/examples/companion_radio/ui-new/Settingsscreen.h b/examples/companion_radio/ui-new/Settingsscreen.h index 9716c31c..8cb53306 100644 --- a/examples/companion_radio/ui-new/Settingsscreen.h +++ b/examples/companion_radio/ui-new/Settingsscreen.h @@ -83,8 +83,8 @@ enum SettingsRowType : uint8_t { ROW_TX_POWER, // TX power (1-20 dBm) ROW_UTC_OFFSET, // UTC offset (-12 to +14) ROW_MSG_NOTIFY, // Keyboard flash on new msg toggle -#if defined(LilyGo_T5S3_EPaper_Pro) ROW_DARK_MODE, // Dark mode toggle (inverted display) +#if defined(LilyGo_T5S3_EPaper_Pro) ROW_PORTRAIT_MODE, // Portrait orientation toggle #endif ROW_GPS_BAUD, // GPS baud rate picker (requires reboot) @@ -309,8 +309,8 @@ private: addRow(ROW_MSG_NOTIFY); addRow(ROW_GPS_BAUD); addRow(ROW_PATH_HASH_SIZE); -#if defined(LilyGo_T5S3_EPaper_Pro) addRow(ROW_DARK_MODE); +#if defined(LilyGo_T5S3_EPaper_Pro) addRow(ROW_PORTRAIT_MODE); #endif #ifdef MECK_WIFI_COMPANION @@ -830,13 +830,13 @@ public: break; } -#if defined(LilyGo_T5S3_EPaper_Pro) case ROW_DARK_MODE: snprintf(tmp, sizeof(tmp), "Dark Mode: %s", _prefs->dark_mode ? "ON" : "OFF"); display.print(tmp); break; +#if defined(LilyGo_T5S3_EPaper_Pro) case ROW_PORTRAIT_MODE: snprintf(tmp, sizeof(tmp), "Portrait Mode: %s", _prefs->portrait_mode ? "ON" : "OFF"); @@ -1677,13 +1677,13 @@ public: case ROW_GPS_BAUD: startEditPicker(findGpsBaudIndex(_prefs->gps_baudrate)); break; -#if defined(LilyGo_T5S3_EPaper_Pro) case ROW_DARK_MODE: _prefs->dark_mode = _prefs->dark_mode ? 0 : 1; the_mesh.savePrefs(); Serial.printf("Settings: Dark mode = %s\n", _prefs->dark_mode ? "ON" : "OFF"); break; +#if defined(LilyGo_T5S3_EPaper_Pro) case ROW_PORTRAIT_MODE: _prefs->portrait_mode = _prefs->portrait_mode ? 0 : 1; the_mesh.savePrefs(); diff --git a/examples/companion_radio/ui-new/UITask.cpp b/examples/companion_radio/ui-new/UITask.cpp index 7080667f..7df0c020 100644 --- a/examples/companion_radio/ui-new/UITask.cpp +++ b/examples/companion_radio/ui-new/UITask.cpp @@ -1181,14 +1181,16 @@ void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* no #if defined(LilyGo_T5S3_EPaper_Pro) // Apply saved display preferences before first render - if (_node_prefs->dark_mode) { - ::display.setDarkMode(true); - } if (_node_prefs->portrait_mode) { ::display.setPortraitMode(true); } #endif + // Apply saved dark mode preference (both T-Deck Pro and T5S3) + if (_node_prefs->dark_mode) { + ::display.setDarkMode(true); + } + setCurrScreen(splash); } @@ -1545,11 +1547,12 @@ if (curr) curr->poll(); if (_display != NULL && _display->isOn()) { if (millis() >= _next_refresh && curr) { -#if defined(LilyGo_T5S3_EPaper_Pro) - // Sync display modes with prefs (settings toggles take effect here) + // Sync dark mode with prefs (settings toggle takes effect here) if (_node_prefs && display.isDarkMode() != (_node_prefs->dark_mode != 0)) { display.setDarkMode(_node_prefs->dark_mode != 0); } +#if defined(LilyGo_T5S3_EPaper_Pro) + // Sync portrait mode with prefs (T5S3 only) if (_node_prefs && display.isPortraitMode() != (_node_prefs->portrait_mode != 0)) { display.setPortraitMode(_node_prefs->portrait_mode != 0); // Text reader layout depends on orientation — force recalculation