wifi: cannot depend on the sleep value

This commit is contained in:
Maxim Prokhorov
2021-04-07 03:39:12 +03:00
parent ae63e5fc0b
commit 22fbfbb6eb

View File

@@ -206,7 +206,7 @@ ActionsQueue& actions() {
// TODO(esp32): Null mode turns off radio, no need for these
bool sleep() {
if ((opmode() == ::wifi::OpmodeNull) && (wifi_fpm_get_sleep_type() == NONE_SLEEP_T)) {
if (opmode() == ::wifi::OpmodeNull) {
wifi_fpm_set_sleep_type(MODEM_SLEEP_T);
yield();
wifi_fpm_open();