Hi Kenneth,
Thanks for the response. It seemed to me like it was implemented according to the photon change log chain under firmware > enhancements .
Under the firmware github though I could only find this in src > wifitester.cpp
const char* parseAntennaSelect(const char* c, WLanSelectAntenna_TypeDef& select) {
static const char* names[] = {
"INTERNAL", "EXTERNAL", "", "AUTO"
};
for (unsigned i=0; i<arraySize(names); i++) {
if (!strncmp(names[i], c, strlen(c))) {
select = WLanSelectAntenna_TypeDef(i);
return names[i];
}
}
return NULL;
}
as well as:
WiFi.on();
serialPrintln("ANTENNA TEST");
serialPrintln("");
serialPrintln("Internal");
serialPrintln("--------");
WiFi.selectAntenna(ANT_INTERNAL);
wifiScan();
serialPrintln("");
serialPrintln("External");
serialPrintln("--------");
WiFi.selectAntenna(ANT_EXTERNAL);
wifiScan();
serialPrintln("ANTENNA TEST COMPLETE");
note here it is "WiFi.selectAntenna()" rather than "WiFi.antennaSelect()"
Neither seemed to compile though:
/spark/compile_service/shared/workspace/6_hal_12_0/firmware-privagaragebotv1.1.cpp: In function 'void setup()':
/spark/compile_service/shared/workspace/6_hal_12_0/firmware-privagaragebotv1.1.cpp:94:28: error: no matching function for call to 'spark::WiFiClass::selectAntenna(const char [5])'
int CharsWrote = 0;
^
/spark/compile_service/shared/workspace/6_hal_12_0/firmware-privagaragebotv1.1.cpp:94:28: note: candidate is:
In file included from ../wiring/inc/spark_wiring.h:41:0,
from ./inc/application.h:29,
from /spark/compile_service/shared/workspace/6_hal_12_0/firmware-privagaragebotv1.1.cpp:2:
../wiring/inc/spark_wiring_wifi.h:167:9: note: int spark::WiFiClass::selectAntenna(WLanSelectAntenna_TypeDef)
int selectAntenna(WLanSelectAntenna_TypeDef antenna) {
^
../wiring/inc/spark_wiring_wifi.h:167:9: note: no known conversion for argument 1 from 'const char [5]' to 'WLanSelectAntenna_TypeDef'