From bcc577ae982a72103fa9d7a68c365a174715cca2 Mon Sep 17 00:00:00 2001 From: mikecarper Date: Tue, 8 Sep 2026 16:56:10 -0700 Subject: [PATCH] Place setup AP status below the WiFi address --- docs/nimble_companion_trial.md | 7 ++++--- examples/companion_radio/ui-new/UITask.cpp | 16 +++++++++------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/docs/nimble_companion_trial.md b/docs/nimble_companion_trial.md index 07e9b52de..ced29182e 100644 --- a/docs/nimble_companion_trial.md +++ b/docs/nimble_companion_trial.md @@ -96,9 +96,10 @@ Short-click to leave the page; hold the button on this page to start or stop the setup AP. From USB, `start webconfig ap` starts the same setup session. When the setup AP is inactive and the node has joined WiFi, this page shows -`WIFI CONNECTED` and an `IP
` row above `HOLD START AP`. The address appears -once assigned and clears when the station disconnects. While the setup AP is -active, the QR page shows the setup portal's address instead. +`WIFI CONNECTED`, `IP
`, `SETUP AP INACTIVE`, then `HOLD START AP` from +top to bottom. The address appears once assigned and clears when the station +disconnects. While the setup AP is active, the QR page shows the setup portal's +address instead. ## Regression checks diff --git a/examples/companion_radio/ui-new/UITask.cpp b/examples/companion_radio/ui-new/UITask.cpp index 1b77cd525..fbe617165 100644 --- a/examples/companion_radio/ui-new/UITask.cpp +++ b/examples/companion_radio/ui-new/UITask.cpp @@ -143,16 +143,14 @@ static bool drawCompactCompanionWiFiSetupPage( display.setCompactText(true); display.setTextSize(1); display.setColor(UIColor::primary_txt); - display.drawTextCentered( - display.width() / 2, 20, - setup_active ? "SETUP AP ACTIVE" : "SETUP AP INACTIVE"); + // Put the connection and its address above the setup AP controls. if (setup_active) { - display.drawTextEllipsized(0, 31, display.width(), setup_ssid); + display.drawTextEllipsized(0, 20, display.width(), setup_ssid); char open_ip[22]; snprintf(open_ip, sizeof(open_ip), "OPEN %s", setup_ip); display.setColor(UIColor::secondary_txt); - display.drawTextCentered(display.width() / 2, 42, open_ip); + display.drawTextCentered(display.width() / 2, 31, open_ip); } else { const bool show_ip = wifi_connected && wifi_ip[0] != 0; const char* wifi_status = !wifi_enabled @@ -160,15 +158,19 @@ static bool drawCompactCompanionWiFiSetupPage( : wifi_connected ? "WIFI CONNECTED" : wifi_configured ? "WIFI CONNECTING" : "WIFI NOT CONFIGURED"; + display.drawTextCentered(display.width() / 2, 20, wifi_status); display.setColor(UIColor::secondary_txt); - display.drawTextCentered(display.width() / 2, show_ip ? 31 : 37, wifi_status); if (show_ip) { char ip_line[19]; // "IP " plus the longest IPv4 address and terminator snprintf(ip_line, sizeof(ip_line), "IP %s", wifi_ip); - display.drawTextCentered(display.width() / 2, 42, ip_line); + display.drawTextCentered(display.width() / 2, 31, ip_line); } } + display.drawTextCentered( + display.width() / 2, 42, + setup_active ? "SETUP AP ACTIVE" : "SETUP AP INACTIVE"); + display.setColor(UIColor::warning_txt); display.drawTextCentered( display.width() / 2, 53,