Add a lock mechanism to improve the OTA chances of success with ESP32 and BLE (#634)

* Add a lock mechanism to improve the OTA chances of success
change TimeBeforeMQTTconnect to InitialMQTTConnectionTimeout
move delay(BLEinterval); after the scan so  the first scan will always be done at start now
remove non relevant delay
add stopProcessing and startProcessing functions
This commit is contained in:
Florian authored and GitHub committed 2020-06-19 12:44:53 -05:00
1 parent eb5fff7fba
commit 9bba730e84
4 files changed
+90 -41

No files matched your search

+4 -4
View File
@@ -279,10 +279,10 @@ uint8_t wifiProtocol = 0; // default mode, automatic selection
# define JSON_MSG_BUFFER 64 // Json message max buffer size, don't put 1024 or higher it is causing unexpected behaviour on ESP8266
#endif
#define TimeBetweenReadingSYS 120 // time between (s) system readings (like memory)
#define TimeBeforeMQTTconnect 10 // time estimated (s) before the board is connected to MQTT
#define subjectSYStoMQTT "/SYStoMQTT"
#define subjectMQTTtoSYSset "/commands/MQTTtoSYS/config"
#define TimeBetweenReadingSYS 120 // time between (s) system readings (like memory)
#define InitialMQTTConnectionTimeout 10 // time estimated (s) before the board is connected to MQTT
#define subjectSYStoMQTT "/SYStoMQTT"
#define subjectMQTTtoSYSset "/commands/MQTTtoSYS/config"
/*-------------------DEFINE LOG LEVEL----------------------*/
#define LOG_LEVEL LOG_LEVEL_NOTICE