mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-27 18:02:17 +03:00
Revert to nonos-sdk 2.2.1, new sdk-switching option in IDE menu for generic board only (#5763)
This commit allows switching SDK firmware: nonos-sdk-pre-v3 shipped with release 2.5.0 has issues: * Some boards show erratic behavior (radio connection is quickly lost), with an unknown cause. These boards work well with previous nonos-sdk-2.2.1 firmware (#5736) * Overall performances seem to have decreased (#5513) This PR restores sdk2.2.1 (as in core-2.4.2). SDK-pre-3.0 - which has brought long awaited fixes (WiFi sleep modes) - is still available through a menu option available only with generic board. BREAKING * new define `-DNONOSDK221=1` or `-DNONOSDK3V0=1` * for external build systems: new library directory: `tools/sdk/lib/<version>/lib` * PIO: variable `PIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK3` is needed for sdk-pre-v3. Fix #5736
This commit is contained in:
@ -249,6 +249,13 @@ int32_t ESP8266WiFiGenericClass::channel(void) {
|
||||
* @param type sleep_type_t
|
||||
* @return bool
|
||||
*/
|
||||
#ifdef NONOSDK221
|
||||
bool ESP8266WiFiGenericClass::setSleepMode(WiFiSleepType_t type, uint8_t listenInterval) {
|
||||
(void)type;
|
||||
(void)listenInterval;
|
||||
return false;
|
||||
}
|
||||
#else // !defined(NONOSDK221)
|
||||
bool ESP8266WiFiGenericClass::setSleepMode(WiFiSleepType_t type, uint8_t listenInterval) {
|
||||
|
||||
/**
|
||||
@ -315,6 +322,7 @@ bool ESP8266WiFiGenericClass::setSleepMode(WiFiSleepType_t type, uint8_t listenI
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
#endif // !defined(NONOSDK221)
|
||||
|
||||
/**
|
||||
* get Sleep mode
|
||||
@ -499,7 +507,11 @@ bool ESP8266WiFiGenericClass::forceSleepWake() {
|
||||
* @return interval
|
||||
*/
|
||||
uint8_t ESP8266WiFiGenericClass::getListenInterval () {
|
||||
#ifdef NONOSDK221
|
||||
return 0;
|
||||
#else
|
||||
return wifi_get_listen_interval();
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@ -507,7 +519,11 @@ uint8_t ESP8266WiFiGenericClass::getListenInterval () {
|
||||
* @return true if max level
|
||||
*/
|
||||
bool ESP8266WiFiGenericClass::isSleepLevelMax () {
|
||||
#ifdef NONOSDK221
|
||||
return false;
|
||||
#else
|
||||
return wifi_get_sleep_level() == MAX_SLEEP_T;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -138,7 +138,9 @@ wl_status_t ESP8266WiFiSTAClass::begin(const char* ssid, const char *passphrase,
|
||||
}
|
||||
|
||||
conf.threshold.rssi = -127;
|
||||
#ifndef NONOSDK221
|
||||
conf.open_and_wep_mode_disable = !(_useInsecureWEP || *conf.password == 0);
|
||||
#endif
|
||||
|
||||
if(bssid) {
|
||||
conf.bssid_set = 1;
|
||||
|
Reference in New Issue
Block a user