File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
ports/esp32s2/common-hal/wifi Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,7 @@ mp_obj_t common_hal_wifi_radio_get_ap_rssi(wifi_radio_obj_t *self) {
151
151
if (!esp_netif_is_netif_up (self -> netif )) {
152
152
return mp_const_none ;
153
153
}
154
+
154
155
// Make sure the interface is in STA mode
155
156
wifi_mode_t if_mode ;
156
157
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) {
161
162
wifi_ap_record_t ap_info ;
162
163
esp_wifi_sta_get_ap_info (& ap_info );
163
164
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 );
168
166
}
169
167
170
168
mp_obj_t common_hal_wifi_radio_get_ipv4_gateway (wifi_radio_obj_t * self ) {
You can’t perform that action at this time.
0 commit comments