fixing portduino is getting old ...

This commit is contained in:
Thomas Göttgens 2022-12-16 20:46:43 +01:00
parent 54686905dc
commit bbaeeb7ce9
3 changed files with 6 additions and 1 deletions

View File

@ -182,6 +182,9 @@ Power::Power() : OSThread("Power")
{ {
statusHandler = {}; statusHandler = {};
low_voltage_counter = 0; low_voltage_counter = 0;
#ifdef DEBUG_HEAP
lastheap = ESP.getFreeHeap();
#endif
} }
bool Power::analogInit() bool Power::analogInit()

View File

@ -182,7 +182,7 @@ void MQTT::reconnect()
sendSubscriptions(); sendSubscriptions();
} else { } else {
DEBUG_MSG("Failed to contact MQTT server (%d/10)...\n",reconnectCount); DEBUG_MSG("Failed to contact MQTT server (%d/10)...\n",reconnectCount);
#if HAS_WIFI #if HAS_WIFI && !defined(ARCH_PORTDUINO)
if (reconnectCount > 9) { if (reconnectCount > 9) {
needReconnect = true; needReconnect = true;
wifiReconnect->setIntervalFromNow(1000); wifiReconnect->setIntervalFromNow(1000);

View File

@ -40,7 +40,9 @@ class Power : private concurrency::OSThread
private: private:
uint8_t low_voltage_counter; uint8_t low_voltage_counter;
#ifdef DEBUG_HEAP
uint32_t lastheap; uint32_t lastheap;
#endif
}; };
extern Power *power; extern Power *power;