You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
while (strip.isUpdating() && millis() < maxWait) delay(1); // wait for strip to finish updating, accessing FS during sendout causes glitches
34
34
35
-
if (!requestJSONBufferLock(10)) return;
35
+
if (!requestJSONBufferLock(JSON_LOCK_PRESET_SAVE)) return;
36
36
37
37
initPresetsFile(); // just in case if someone deleted presets.json using /edit
38
38
JsonObject sObj = pDoc->to<JsonObject>();
@@ -86,7 +86,7 @@ static void doSaveState() {
86
86
87
87
boolgetPresetName(byte index, String& name)
88
88
{
89
-
if (!requestJSONBufferLock(19)) returnfalse;
89
+
if (!requestJSONBufferLock(JSON_LOCK_PRESET_NAME)) returnfalse;
90
90
bool presetExists = false;
91
91
if (readObjectFromFileUsingId(getPresetsFileName(), index, pDoc)) {
92
92
JsonObject fdo = pDoc->as<JsonObject>();
@@ -152,7 +152,7 @@ void handlePresets()
152
152
return;
153
153
}
154
154
155
-
if (presetToApply == 0 || !requestJSONBufferLock(9)) return; // no preset waiting to apply, or JSON buffer is already allocated, return to loop until free
155
+
if (presetToApply == 0 || !requestJSONBufferLock(JSON_LOCK_PRESET_LOAD)) return; // no preset waiting to apply, or JSON buffer is already allocated, return to loop until free
156
156
157
157
bool changePreset = false;
158
158
uint8_t tmpPreset = presetToApply; // store temporary since deserializeState() may call applyPreset()
0 commit comments