diff --git a/wled00/FX.h b/wled00/FX.h index 5ec252e8..7f66f074 100644 --- a/wled00/FX.h +++ b/wled00/FX.h @@ -76,7 +76,7 @@ uint32_t color_add(uint32_t,uint32_t); #ifndef MAX_NUM_SEGMENTS #define MAX_NUM_SEGMENTS 32 #endif - #define MAX_SEGMENT_DATA 20480 + #define MAX_SEGMENT_DATA 32768 #endif /* How much data bytes each segment should max allocate to leave enough space for other segments, diff --git a/wled00/FX_fcn.cpp b/wled00/FX_fcn.cpp index 45254468..a4cb9c48 100644 --- a/wled00/FX_fcn.cpp +++ b/wled00/FX_fcn.cpp @@ -82,7 +82,7 @@ Segment::Segment(const Segment &orig) { _dataLen = 0; //_t = nullptr; if (orig.name) { name = new char[strlen(orig.name)+1]; if (name) strcpy(name, orig.name); } - if (orig.data) { allocateData(orig._dataLen); memcpy(data, orig.data, orig._dataLen); } + if (orig.data) { if (allocateData(orig._dataLen)) memcpy(data, orig.data, orig._dataLen); } //if (orig._t) { _t = new Transition(orig._t->_dur, orig._t->_briT, orig._t->_cctT, orig._t->_colorT); } DEBUG_PRINTF(" Original data: %p (%d)\n", orig.data, (int)orig._dataLen); DEBUG_PRINTF(" Constructed data: %p (%d)\n", data, (int)_dataLen); @@ -112,7 +112,7 @@ Segment& Segment::operator= (const Segment &orig) { _dataLen = 0; //_t = nullptr; if (orig.name) { name = new char[strlen(orig.name)+1]; if (name) strcpy(name, orig.name); } - if (orig.data) { allocateData(orig._dataLen); memcpy(data, orig.data, orig._dataLen); } + if (orig.data) { if (allocateData(orig._dataLen)) memcpy(data, orig.data, orig._dataLen); } //if (orig._t) { _t = new Transition(orig._t->_dur, orig._t->_briT, orig._t->_cctT, orig._t->_colorT); } DEBUG_PRINTF(" Original data: %p (%d)\n", orig.data, (int)orig._dataLen); DEBUG_PRINTF(" Copied data: %p (%d)\n", data, (int)_dataLen); diff --git a/wled00/wled.h b/wled00/wled.h index 71ed42e8..228fec29 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -8,7 +8,7 @@ */ // version code in format yymmddb (b = daily build) -#define VERSION 2207292 +#define VERSION 2207293 //uncomment this if you have a "my_config.h" file you'd like to use //#define WLED_USE_MY_CONFIG