Skip to content

Commit e9c9fce

Browse files
committed
Remove debug log messages
1 parent ae3b440 commit e9c9fce

File tree

2 files changed

+3
-44
lines changed

2 files changed

+3
-44
lines changed

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

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -198,55 +198,20 @@ mp_obj_t common_hal_wifi_radio_get_ap_info(wifi_radio_obj_t *self) {
198198
if (esp_wifi_sta_get_ap_info(&self->ap_info.record) != ESP_OK){
199199
return mp_const_none;
200200
} else {
201-
ESP_EARLY_LOGW(TAG, "country before handler country: %s", (char *)&self->ap_info.record.country);
202-
ESP_EARLY_LOGW(TAG, "country memory at: %p", self->ap_info.record.country);
203-
ESP_EARLY_LOGW(TAG, "countryCC memory at: %p", self->ap_info.record.country.cc);
204-
ESP_EARLY_LOGW(TAG, "countryCC strlen: %d", strlen(self->ap_info.record.country.cc));
205201
// The struct member appears to be <null> (not NULL!), I don't know how to properly test for it.
206-
// If the ESP-IDF starts working fine, this "if" wouldn't trigger.
202+
// When the ESP-IDF starts working fine (when their bugfix is available), this "if" wouldn't trigger.
207203
// Note: It is possible that Wi-Fi APs don't have a CC set, then even after this workaround
208204
// the element would remain empty.
209205
if (strlen(self->ap_info.record.country.cc) == 0) {
210206
// Workaround to fill country related information in ap_info until ESP-IDF carries a fix
211207
// esp_wifi_sta_get_ap_info does not appear to fill wifi_country_t (e.g. country.cc) details
212208
// (IDFGH-4437) #6267
213-
ESP_EARLY_LOGW(TAG, "Triggered missing country workaround");
214209
if (esp_wifi_get_country(&self->ap_info.record.country) == ESP_OK) {
215-
ESP_EARLY_LOGW(TAG, "Workaround worked fine!");
216-
ESP_EARLY_LOGW(TAG, "country: %d", self->ap_info.record.country);
217-
ESP_EARLY_LOGW(TAG, "CC: %s", self->ap_info.record.country.cc);
210+
ESP_EARLY_LOGW(TAG, "Country Code: %s", self->ap_info.record.country.cc);
218211
} else {
219-
ESP_EARLY_LOGW(TAG, "Workaround failed!");
212+
ESP_EARLY_LOGW(TAG, "Country Code - Workaround failed!");
220213
}
221-
//} else {
222-
// ESP_EARLY_LOGW(TAG, "Triggered missing country workaround IN ELSE");
223-
// //memset(&self->ap_info.record.country, 0, sizeof(wifi_country_t));
224-
// if (esp_wifi_get_country(&self->ap_info.record.country) == ESP_OK) {
225-
// //if (esp_wifi_get_country(&self->ap_info.record.country) == ESP_OK) {
226-
// ESP_EARLY_LOGW(TAG, "Workaround worked fine!");
227-
// ESP_EARLY_LOGW(TAG, "CC: %s", self->ap_info.record.country.cc);
228-
// } else {
229-
// ESP_EARLY_LOGW(TAG, "Workaround failed!");
230-
// }
231214
}
232-
ESP_EARLY_LOGW(TAG, "ssid: %s", self->ap_info.record.ssid);
233-
ESP_EARLY_LOGW(TAG, "channel: %d", self->ap_info.record.primary);
234-
ESP_EARLY_LOGW(TAG, "secondary: %d", self->ap_info.record.second);
235-
ESP_EARLY_LOGW(TAG, "rssi: %d", self->ap_info.record.rssi);
236-
ESP_EARLY_LOGW(TAG, "authmode: %d", self->ap_info.record.authmode);
237-
ESP_EARLY_LOGW(TAG, "pairwise_cipher: %d", self->ap_info.record.pairwise_cipher);
238-
ESP_EARLY_LOGW(TAG, "group_cipher: %d", self->ap_info.record.group_cipher);
239-
ESP_EARLY_LOGW(TAG, "11b: %d", self->ap_info.record.phy_11b);
240-
ESP_EARLY_LOGW(TAG, "11g: %d", self->ap_info.record.phy_11g);
241-
ESP_EARLY_LOGW(TAG, "11n: %d", self->ap_info.record.phy_11n);
242-
ESP_EARLY_LOGW(TAG, "phy_lr: %d", self->ap_info.record.phy_lr);
243-
ESP_EARLY_LOGW(TAG, "ap_info.record: %s", self->ap_info.record);
244-
ESP_EARLY_LOGW(TAG, "country with cast: %s", (char *)&self->ap_info.record.country);
245-
//ESP_EARLY_LOGW(TAG, "country: %s", self->ap_info.record.country);
246-
ESP_EARLY_LOGW(TAG, "country memory at: %p", self->ap_info.record.country);
247-
ESP_EARLY_LOGW(TAG, "countryCC: %s", self->ap_info.record.country.cc);
248-
ESP_EARLY_LOGW(TAG, "countryCC memory at: %p", self->ap_info.record.country.cc);
249-
ESP_EARLY_LOGW(TAG, "countryCC strlen: %d", strlen(self->ap_info.record.country.cc));
250215
memcpy(&ap_info->record, &self->ap_info.record, sizeof(wifi_ap_record_t));
251216
return MP_OBJ_FROM_PTR(ap_info);
252217
}

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@
3939

4040
#include "components/esp_wifi/include/esp_wifi.h"
4141

42-
#include "components/log/include/esp_log.h"
43-
44-
static const char* TAG = "wifi";
45-
4642
static void wifi_scannednetworks_done(wifi_scannednetworks_obj_t *self) {
4743
self->done = true;
4844
if (self->results != NULL) {
@@ -121,8 +117,6 @@ mp_obj_t common_hal_wifi_scannednetworks_next(wifi_scannednetworks_obj_t *self)
121117

122118
wifi_network_obj_t *entry = m_new_obj(wifi_network_obj_t);
123119
entry->base.type = &wifi_network_type;
124-
// benny remove again
125-
ESP_EARLY_LOGW(TAG, "scan country: %s", &self->results[self->current_result].country);
126120
memcpy(&entry->record, &self->results[self->current_result], sizeof(wifi_ap_record_t));
127121
self->current_result++;
128122

0 commit comments

Comments
 (0)