reset.cpp: no sleep while joining

This commit is contained in:
cyberman54 2020-12-16 09:36:16 +01:00
parent 570a3ea486
commit 973635e0e5

View File

@ -70,6 +70,12 @@ void do_after_reset(void) {
void enter_deepsleep(const uint64_t wakeup_sec = 60, void enter_deepsleep(const uint64_t wakeup_sec = 60,
gpio_num_t wakeup_gpio = GPIO_NUM_MAX) { gpio_num_t wakeup_gpio = GPIO_NUM_MAX) {
#if (HAS_LORA)
if (!LMIC.devaddr)
ESP_LOGI(TAG, "Can't go to sleep while joining");
return;
#endif
int i; int i;
// validate wake up pin, if we have // validate wake up pin, if we have