Show the clock and build stamp on the status screen, move Wi-Fi Country to the Wi-Fi portal - #2
Merged
Merged
Conversation
where it belongs Three things from using the device rather than reading it. Wi-Fi Country sat on the setup portal's parameter page, among the webhook URL and the button labels. That portal calls setParamsPage(true), so its parameters render away from the network list, which is the one place the country setting matters: it decides which channels the scan shows. It is now only in the Wi-Fi portal, where parameters share a page with the scan results, and where you already are when a network is missing from them. The status screen, one button hold from idle, now shows the local time and the build stamp. "clock not set" there is the visible symptom of a receiver that is not returning a clock, which is otherwise only findable over serial and stops the scheduled reset without any other sign. The build stamp was already on the device info screen, but that is three steps into the settings menu and nobody found it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SFniCJ94a3sciMP9MtbPfs
Removing it from the setup portal fixed the placement by taking the field away, which is worse than having it in the wrong spot. setParamsPage() bundles two unrelated things: it sets _paramsInWifi, which gates whether parameters render and save on the Wi-Fi page, and it swaps the menu. Calling it with true confined the parameters to Setup. What the flag does not gate is the Setup page itself, because handleParam() renders unconditionally, so turning the flag on and putting "param" back in the menu by hand gives both pages, and a save from either commits everything. Wi-Fi Country is registered first so that on the Wi-Fi page it lands under the network fields rather than below six button labels. One behaviour change worth knowing: saving from the Wi-Fi page now runs save_params_callback, which sets web_portal_saved_ and ends the portal. That did not happen before, and it is the right outcome after changing networks. Parameters are seeded from the current state, so a save that touched nothing writes back what was already there. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SFniCJ94a3sciMP9MtbPfs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three fixes from using the device rather than reading the code, after #1 landed.
Wi-Fi Country is now on the Wi-Fi page too
It was only on the Setup page, filed alongside the webhook URL and the six button labels. It is the setting that decides which channels a scan returns, so reaching it meant leaving the list of networks that was missing the one you were looking for.
setParamsPage()bundles two unrelated things: it sets_paramsInWifi, which gates whether parameters render and save on the Wi-Fi page, and it swaps the menu. Passingtrueconfined every parameter to Setup. There is no per-parameter placement, so one field cannot be moved on its own.What the flag does not gate is the Setup page, because
handleParam()renders unconditionally. Turning the flag on and puttingparamback in the menu by hand gives both pages, and a save from either commits everything. Wi-Fi Country is registered first so that on the Wi-Fi page it lands under the network fields rather than below the button labels.One behaviour change: saving from the Wi-Fi page now runs
save_params_callback, which setsweb_portal_saved_and ends the portal. It did not before. That is the right outcome after changing networks, and since parameters are seeded from current state, a save that touched nothing writes back what was already there.The status screen shows the clock and the build
Hold any single button for 2 s from idle:
The time is local, using the offset the receiver last reported.
clock not setin its place is the visible symptom of a receiver that is not returningtsandtz_offset, which otherwise shows up only over serial and quietly stops the scheduled reset.The build line is one line while the firmware and SPIFFS stamps agree and splits into
fwandfswhen they do not, so a forgottenuploadfsis obvious.Both were already on the device info screen, but that is three steps into the settings menu and is not where anyone looks.
Verification
Both environments build, 26 host tests pass. The screen change is draw-only and the portal change is parameter registration, so neither touches the counter, webhook or reset paths.
Not yet exercised on hardware. The portal change in particular is worth a look in a browser before merging.