Skip to content

Commit

Permalink
Merge pull request #134 from pkendall64/max-power
Browse files Browse the repository at this point in the history
Update power levels for wifi modes to full power
  • Loading branch information
pkendall64 committed Apr 8, 2024
2 parents 0b801ca + 4855199 commit a7458e0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/WIFI/devWIFI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,10 @@ static void startWiFi(unsigned long now)
WiFi.disconnect();
WiFi.mode(WIFI_OFF);
#if defined(PLATFORM_ESP8266)
WiFi.setOutputPower(13);
WiFi.setOutputPower(20.5);
WiFi.setPhyMode(WIFI_PHY_MODE_11N);
#elif defined(PLATFORM_ESP32)
WiFi.setTxPower(WIFI_POWER_13dBm);
WiFi.setTxPower(WIFI_POWER_19_5dBm);
#endif
if (firmwareOptions.home_wifi_ssid[0] != 0) {
strcpy(station_ssid, firmwareOptions.home_wifi_ssid);
Expand Down
5 changes: 5 additions & 0 deletions src/Tx_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,11 @@ void SetSoftMACAddress()
firmwareOptions.uid[0] = firmwareOptions.uid[0] & ~0x01;

WiFi.mode(WIFI_STA);
#if defined(PLATFORM_ESP8266)
WiFi.setOutputPower(20.5);
#elif defined(PLATFORM_ESP32)
WiFi.setTxPower(WIFI_POWER_19_5dBm);
#endif
WiFi.begin("network-name", "pass-to-network", 1);
WiFi.disconnect();

Expand Down
5 changes: 5 additions & 0 deletions src/Vrx_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,11 @@ void SetSoftMACAddress()
firmwareOptions.uid[0] = firmwareOptions.uid[0] & ~0x01;

WiFi.mode(WIFI_STA);
#if defined(PLATFORM_ESP8266)
WiFi.setOutputPower(20.5);
#elif defined(PLATFORM_ESP32)
WiFi.setTxPower(WIFI_POWER_19_5dBm);
#endif
WiFi.begin("network-name", "pass-to-network", 1);
WiFi.disconnect();

Expand Down

0 comments on commit a7458e0

Please sign in to comment.