mirror of https://github.com/arendst/Tasmota.git
Relaunch wifi on esp_now_init failure
Signed-off-by: Sara Damiano <sdamiano@stroudcenter.org>
This commit is contained in:
parent
1f3bb675ba
commit
df772b5c0a
|
@ -387,6 +387,10 @@ void MESHstartNode(int32_t _channel, uint8_t _role){ //we need a running broker
|
|||
MESHsetWifi(0);
|
||||
if (esp_now_init() != 0) {
|
||||
AddLog(LOG_LEVEL_INFO, PSTR("MSH: Node init failed"));
|
||||
// try to re-launch wifi
|
||||
MESH.role = ROLE_NONE;
|
||||
MESHsetWifi(1);
|
||||
WifiBegin(3, MESH.channel);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue