temp-netsender: build failure with ESP8266
- Dominant language
- Go
- Stars
- 0
- Forks
- 0
- Avg merge
- 1h 27m
- Merged PRs (30d)
- 1
Description
When building for `ESP8266` I get the following:
```
sketch/NetSender.cpp: In function 'void NetSender::wifiOff()':
NetSender.cpp:679:13: error: 'WIFI_MODE_NULL' was not declared in this scope
WiFi.mode(WIFI_MODE_NULL);
^
exit status 1
'WIFI_MODE_NULL' was not declared in this scope
```
The relevant code is here
```
void wifiOff() {
#ifdef ESP8266
wifi_station_disconnect();
bool stopped = false;
for (int attempts = 0; !stopped && attempts < WIFI_ATTEMPTS; attempts++) {
stopped = (wifi_station_get_connect_status() == DHCP_STOPPED);
delay(WIFI_DELAY);
}
if (!stopped) {
log(logError, "DHCP not stopping.");
restart(bootWiFi, true);
}
wifi_set_opmode(NULL_MODE);
wifi_set_sleep_type(MODEM_SLEEP_T);
wifi_fpm_open();
wifi_fpm_do_sleep(0xFFFFFFF);
#endif
WiFi.mode(WIFI_MODE_NULL);
delay(WIFI_DELAY);
#ifdef ESP32
#endif
log(logDebug, "WiFi off");
}
```
`nonarduino.h` contains this macro, but `nonarduino.h` is only included for `__linux__`.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in NetSender.cpp at wifiOff() and compare the ESP8266 build path with the nonarduino.h macro definition. Build the project for ESP8266 to reproduce the missing WIFI_MODE_NULL declaration; done means that target builds successfully without breaking the other guarded paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- arduino, cpp
- Domain
- build-system, embedded-iot
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100