Skip to content

Commit 76f1db7

Browse files
committed
Set sta_mode flag for actual use/checking
1 parent 9d840aa commit 76f1db7

File tree

1 file changed

+3
-1
lines changed
  • ports/esp32s2/common-hal/wifi

1 file changed

+3
-1
lines changed

ports/esp32s2/common-hal/wifi/Radio.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ static void start_station(wifi_radio_obj_t *self) {
5353
}
5454
esp_wifi_set_mode(next_mode);
5555

56+
self->sta_mode = 1;
57+
5658
esp_wifi_set_config(WIFI_MODE_STA, &self->sta_config);
5759
}
5860

@@ -156,7 +158,7 @@ mp_obj_t common_hal_wifi_radio_get_ap_info(wifi_radio_obj_t *self) {
156158
}
157159

158160
// Make sure the interface is in STA mode
159-
if (self->sta_mode){
161+
if (!self->sta_mode){
160162
return mp_const_none;
161163
}
162164

0 commit comments

Comments
 (0)