@@ -527,10 +527,19 @@ void wifiStart(NetIndex_t index, uintptr_t parameter, bool debug)
527527// ----------------------------------------
528528// Wifi start sequence
529529// ----------------------------------------
530- NETWORK_POLL_SEQUENCE wifiStartSequence[] =
531- { // State Parameter Description
532- {wifiStart, 0 , " Initialize Wifi" },
533- {nullptr , 0 , " Termination" },
530+ NETWORK_POLL_SEQUENCE wifiStartSequence[] = {
531+ // State Parameter Description
532+ {wifiStart, 0 , " Initialize WiFi" },
533+ {nullptr , 0 , " Termination" },
534+ };
535+
536+ // ----------------------------------------
537+ // Wifi start sequence
538+ // ----------------------------------------
539+ NETWORK_POLL_SEQUENCE wifiStopSequence[] = {
540+ // State Parameter Description
541+ {wifiStop, 0 , " Shutdown WiFi" },
542+ {nullptr , 0 , " Termination" },
534543};
535544
536545// ----------------------------------------
@@ -571,11 +580,21 @@ void wifiStop()
571580 systemPrintln (" WiFi Stopped" );
572581 }
573582
583+ // Take the network offline
584+ networkMarkOffline (NETWORK_WIFI);
585+
574586 // Display the heap state
575587 reportHeapNow (settings.debugWifiState );
576588 wifiRunning = false ;
577589}
578590
591+ // Needed for wifiStopSequence
592+ void wifiStop (NetIndex_t index, uintptr_t parameter, bool debug)
593+ {
594+ wifiStop ();
595+ networkSequenceNextEntry (NETWORK_WIFI, settings.debugNetworkLayer );
596+ }
597+
579598// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
580599// WiFi Config Support Routines - compiled out
581600// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
0 commit comments