Skip to content

Commit bc8863a

Browse files
committed
Simplify now that I have it working
still need to figure out the bound method business
1 parent 04ffd0d commit bc8863a

File tree

1 file changed

+2
-4
lines changed
  • ports/esp32s2/common-hal/wifi

1 file changed

+2
-4
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ mp_obj_t common_hal_wifi_radio_get_ap_rssi(wifi_radio_obj_t *self) {
151151
if (!esp_netif_is_netif_up(self->netif)) {
152152
return mp_const_none;
153153
}
154+
154155
// Make sure the interface is in STA mode
155156
wifi_mode_t if_mode;
156157
esp_wifi_get_mode(&if_mode);
@@ -161,10 +162,7 @@ mp_obj_t common_hal_wifi_radio_get_ap_rssi(wifi_radio_obj_t *self) {
161162
wifi_ap_record_t ap_info;
162163
esp_wifi_sta_get_ap_info(&ap_info);
163164

164-
mp_obj_t rssi;
165-
rssi = MP_OBJ_NEW_SMALL_INT(ap_info.rssi);
166-
167-
return rssi;
165+
return MP_OBJ_NEW_SMALL_INT(ap_info.rssi);
168166
}
169167

170168
mp_obj_t common_hal_wifi_radio_get_ipv4_gateway(wifi_radio_obj_t *self) {

0 commit comments

Comments
 (0)