improve robustness when heap is low
* customMappingTable: allocate using calloc instead of new (new will throw exception if nor enough heap) * fixing a few minor memory leaks * ws.cpp: catch out-of-memory in sendLiveLedsWs * ws.cpp: change interval to 80ms (120 ws very slow...)
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
//#define WLED_DEBUG_NTP
|
||||
#define NTP_SYNC_INTERVAL 42000UL //Get fresh NTP time about twice per day
|
||||
|
||||
Timezone* tz;
|
||||
Timezone* tz = nullptr;
|
||||
|
||||
#define TZ_UTC 0
|
||||
#define TZ_UK 1
|
||||
@@ -38,7 +38,7 @@ Timezone* tz;
|
||||
byte tzCurrent = TZ_INIT; //uninitialized
|
||||
|
||||
void updateTimezone() {
|
||||
delete tz;
|
||||
if (tz) {delete tz; tz = nullptr;}
|
||||
TimeChangeRule tcrDaylight = {Last, Sun, Mar, 1, 0}; //UTC
|
||||
TimeChangeRule tcrStandard = tcrDaylight; //UTC
|
||||
|
||||
|
||||
Reference in New Issue
Block a user