mirror of
https://github.com/wled/WLED.git
synced 2025-04-23 14:27:18 +00:00
Bugfix for ESP8266 saving segments.
This commit is contained in:
parent
b7fb9e182b
commit
3acc521741
@ -331,7 +331,7 @@ class WS2812FX {
|
||||
deallocateData();
|
||||
if (WS2812FX::instance->_usedSegmentData + len > MAX_SEGMENT_DATA) return false; //not enough memory
|
||||
// if possible use SPI RAM on ESP32
|
||||
#ifdef ARDUINO_ARCH_ESP32 && defined(WLED_USE_PSRAM)
|
||||
#if defined(ARDUINO_ARCH_ESP32) && defined(WLED_USE_PSRAM)
|
||||
if (psramFound())
|
||||
data = (byte*) ps_malloc(len);
|
||||
else
|
||||
|
@ -456,7 +456,7 @@ void serializeState(JsonObject root, bool forPreset, bool includeBri, bool segme
|
||||
// use rev:2 API if more than 12 segments on ESP8266
|
||||
uint8_t tooMany = 0;
|
||||
for(uint8_t i=0; i < strip.getMaxSegments(); i++) if ((strip.getSegment(i)).isActive()) tooMany++;
|
||||
if (tooMany>12)
|
||||
if (tooMany<13)
|
||||
#endif
|
||||
root.remove("rev"); // remove API revision if ESP32 or ESP8266 with less than 13 segments
|
||||
uint8_t versionAPI = root["rev"] | 1;
|
||||
@ -594,7 +594,7 @@ void serializeInfo(JsonObject root)
|
||||
#endif
|
||||
|
||||
root[F("freeheap")] = ESP.getFreeHeap();
|
||||
#ifdef ARDUINO_ARCH_ESP32 && defined(WLED_USE_PSRAM)
|
||||
#if defined(ARDUINO_ARCH_ESP32) && defined(WLED_USE_PSRAM)
|
||||
if (psramFound()) root[F("psram")] = ESP.getFreePsram();
|
||||
#endif
|
||||
root[F("uptime")] = millis()/1000 + rolloverMillis*4294967;
|
||||
|
@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
// version code in format yymmddb (b = daily build)
|
||||
#define VERSION 2106161
|
||||
#define VERSION 2106181
|
||||
|
||||
//uncomment this if you have a "my_config.h" file you'd like to use
|
||||
//#define WLED_USE_MY_CONFIG
|
||||
|
@ -311,7 +311,7 @@ void getSettingsJS(byte subPage, char* dest)
|
||||
#ifdef WLED_DEBUG
|
||||
oappend(SET_F(",1")); // debug output (TX) pin
|
||||
#endif
|
||||
#ifdef ARDUINO_ARCH_ESP32 && defined(WLED_USE_PSRAM)
|
||||
#if defined(ARDUINO_ARCH_ESP32) && defined(WLED_USE_PSRAM)
|
||||
if (psramFound()) oappend(SET_F(",16,17")); // GPIO16 & GPIO17 reserved for SPI RAM
|
||||
#endif
|
||||
//TODO: add reservations for Ethernet shield pins
|
||||
|
Loading…
x
Reference in New Issue
Block a user