Skip to content

Commit b5b2815

Browse files
committed
Added dual antenna configuration based on the module selection
1 parent 16fa7f1 commit b5b2815

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

libraries/WiFi/src/WiFiGeneric.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,6 +1061,14 @@ bool WiFiGenericClass::mode(wifi_mode_t m)
10611061
if(!espWiFiStart()){
10621062
return false;
10631063
}
1064+
1065+
#ifdef BOARD_HAS_DUAL_ANTENNA
1066+
if(!setDualAntennaConfig(ANT1, ANT2, WIFI_RX_ANT_AUTO, WIFI_TX_ANT_AUTO)){
1067+
log_e("Dual Antenna Config failed!");
1068+
return false;
1069+
}
1070+
#endif
1071+
10641072
return true;
10651073
}
10661074

variants/esp32da/pins_arduino.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ static const uint8_t T9 = 32;
5353
static const uint8_t DAC1 = 25;
5454
static const uint8_t DAC2 = 26;
5555

56+
#define BOARD_HAS_DUAL_ANTENNA
5657
static const uint8_t ANT1 = 2;
5758
static const uint8_t ANT2 = 25;
5859

0 commit comments

Comments
 (0)