Merge pull request #534 from mc-hamster/master

Fix for #533 - We will deinit wifi even if it were never initialized.
1.2-legacy
Jm Casler 2020-11-27 16:19:03 -08:00 zatwierdzone przez GitHub
commit 9170dc7738
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
3 zmienionych plików z 7 dodań i 5 usunięć

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -50,7 +50,7 @@ From lower to higher power consumption.
- At cold boot: The initial state (after setup() has run) is DARK - At cold boot: The initial state (after setup() has run) is DARK
- While in DARK: if we receive EVENT_BOOT, transition to ON (and show the bootscreen). This event will be sent if we detect we woke due to reset (as opposed to deep sleep) - While in DARK: if we receive EVENT_BOOT, transition to ON (and show the bootscreen). This event will be sent if we detect we woke due to reset (as opposed to deep sleep)
- While in LS: Once every position_broadcast_secs (default 15 mins) - the unit will wake into DARK mode and broadcast a "networkPing" (our position) and stay alive for wait_bluetooth_secs (default 30 seconds). This allows other nodes to have a record of our last known position if we go away and allows a paired phone to hear from us and download messages. - While in LS: Once every position_broadcast_secs (default 15 mins) - the unit will wake into DARK mode and broadcast a "networkPing" (our position) and stay alive for wait_bluetooth_secs (default 60 seconds). This allows other nodes to have a record of our last known position if we go away and allows a paired phone to hear from us and download messages.
- While in LS: Every send*owner_interval (defaults to 4, i.e. one hour), when we wake to send our position we \_also* broadcast our owner. This lets new nodes on the network find out about us or correct duplicate node number assignments. - While in LS: Every send*owner_interval (defaults to 4, i.e. one hour), when we wake to send our position we \_also* broadcast our owner. This lets new nodes on the network find out about us or correct duplicate node number assignments.
- While in LS/NB/DARK: If the user presses a button (EVENT_PRESS) we go to full ON mode for screen_on_secs (default 30 seconds). Multiple presses keeps resetting this timeout - While in LS/NB/DARK: If the user presses a button (EVENT_PRESS) we go to full ON mode for screen_on_secs (default 30 seconds). Multiple presses keeps resetting this timeout
- While in LS/NB/DARK: If we receive new text messages (EVENT_RECEIVED_TEXT_MSG), we go to full ON mode for screen_on_secs (same as if user pressed a button) - While in LS/NB/DARK: If we receive new text messages (EVENT_RECEIVED_TEXT_MSG), we go to full ON mode for screen_on_secs (same as if user pressed a button)

Wyświetl plik

@ -50,9 +50,11 @@ void deinitWifi()
saving on the 2.4g transceiver. saving on the 2.4g transceiver.
*/ */
WiFi.mode(WIFI_MODE_NULL); if (isWifiAvailable()) {
DEBUG_MSG("WiFi Turned Off\n"); WiFi.mode(WIFI_MODE_NULL);
// WiFi.printDiag(Serial); DEBUG_MSG("WiFi Turned Off\n");
// WiFi.printDiag(Serial);
}
} }
// Startup WiFi // Startup WiFi
@ -118,7 +120,7 @@ void initWifi()
} }
} }
if (!MDNS.begin( "Meshtastic" )) { if (!MDNS.begin("Meshtastic")) {
DEBUG_MSG("Error setting up MDNS responder!\n"); DEBUG_MSG("Error setting up MDNS responder!\n");
while (1) { while (1) {