Re-issue WiFi scan on the periodic refresh timer
The WiFi page only re-read the access-point list every 3s, so a scan that was slow, denied, or interrupted left the network list permanently empty until a manual F5. Re-request the scan on each timer tick (skipped while a connection attempt is in flight) so results appear automatically once NetworkManager completes a scan.
This commit is contained in:
@@ -220,6 +220,15 @@ void WiFiSetupPage::update(float dt) {
|
||||
refreshTimer_ += dt;
|
||||
if (refreshTimer_ >= 3.0f) {
|
||||
refreshTimer_ = 0.0f;
|
||||
|
||||
// Re-issue a scan on every tick rather than only re-reading results:
|
||||
// NetworkManager only reports access points from completed scans, so a
|
||||
// slow or failed first scan would otherwise leave the list empty
|
||||
// forever. Skipped while a connection attempt is running to avoid
|
||||
// churning the radio mid-connect.
|
||||
if (state_ && !connectInProgress_) {
|
||||
state_->network.requestScan();
|
||||
}
|
||||
refreshNetworkState();
|
||||
|
||||
// During the First-Run walkthrough, leave the WiFi page automatically
|
||||
|
||||
Reference in New Issue
Block a user