From 698d563dcfee91bd67254cc9b2ba55b39693e8f4 Mon Sep 17 00:00:00 2001 From: Tod Kurt Date: Thu, 30 Jun 2022 15:33:03 -0700 Subject: [PATCH] adust wifi.radio.tx_power to be x4 (in db) as mentioned in #6540 --- ports/espressif/common-hal/wifi/Radio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/espressif/common-hal/wifi/Radio.c b/ports/espressif/common-hal/wifi/Radio.c index 4aa9f9cfdd..bc6e12dfd3 100644 --- a/ports/espressif/common-hal/wifi/Radio.c +++ b/ports/espressif/common-hal/wifi/Radio.c @@ -142,11 +142,11 @@ void common_hal_wifi_radio_set_mac_address(wifi_radio_obj_t *self, const uint8_t uint8_t common_hal_wifi_radio_get_tx_power(wifi_radio_obj_t *self) { int8_t tx_power; esp_wifi_get_max_tx_power(&tx_power); - return tx_power; + return tx_power / 4; } void common_hal_wifi_radio_set_tx_power(wifi_radio_obj_t *self, const uint8_t tx_power) { - esp_wifi_set_max_tx_power(tx_power); + esp_wifi_set_max_tx_power(tx_power * 4); } mp_obj_t common_hal_wifi_radio_get_mac_address_ap(wifi_radio_obj_t *self) {