sforkowany z mirror/meshtastic-firmware
				
			That wifi update didn't go down well.
							rodzic
							
								
									990c0119a7
								
							
						
					
					
						commit
						95cc328b5c
					
				| 
						 | 
				
			
			@ -41,12 +41,6 @@ static bool needReconnect = true; // If we create our reconnector, run it once a
 | 
			
		|||
 | 
			
		||||
static Periodic *wifiReconnect;
 | 
			
		||||
 | 
			
		||||
void triggerReconnect()
 | 
			
		||||
{
 | 
			
		||||
    needReconnect = true;
 | 
			
		||||
    wifiReconnect->setIntervalFromNow(1000);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int32_t reconnectWiFi()
 | 
			
		||||
{
 | 
			
		||||
    const char *wifiName = config.network.wifi_ssid;
 | 
			
		||||
| 
						 | 
				
			
			@ -82,9 +76,6 @@ static int32_t reconnectWiFi()
 | 
			
		|||
 | 
			
		||||
        } else {
 | 
			
		||||
            DEBUG_MSG("NTP Update failed\n");
 | 
			
		||||
            WiFi.disconnect(false, true);
 | 
			
		||||
            needReconnect = true;
 | 
			
		||||
            return 1000;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,8 +13,6 @@ bool initWifi();
 | 
			
		|||
 | 
			
		||||
void deinitWifi();
 | 
			
		||||
 | 
			
		||||
void triggerReconnect();
 | 
			
		||||
 | 
			
		||||
bool isWifiAvailable();
 | 
			
		||||
 | 
			
		||||
uint8_t getWifiDisconnectReason();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,4 @@
 | 
			
		|||
#include "MQTT.h"
 | 
			
		||||
#include "mesh/http/WiFiAPClient.h"
 | 
			
		||||
#include "MeshService.h"
 | 
			
		||||
#include "NodeDB.h"
 | 
			
		||||
#include "PowerFSM.h"
 | 
			
		||||
| 
						 | 
				
			
			@ -165,10 +164,6 @@ void MQTT::reconnect()
 | 
			
		|||
            sendSubscriptions();
 | 
			
		||||
        } else
 | 
			
		||||
            DEBUG_MSG("Failed to contact MQTT server...\n");
 | 
			
		||||
#if HAS_WIFI && !defined(ARCH_PORTDUINO)
 | 
			
		||||
            WiFi.disconnect(false, true);
 | 
			
		||||
            triggerReconnect();
 | 
			
		||||
#endif
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Ładowanie…
	
		Reference in New Issue