From 00576355ffe339b2d85792350fd042149e70fdbe Mon Sep 17 00:00:00 2001 From: Alexey Zholtikov Date: Sun, 26 Feb 2023 14:20:48 +0300 Subject: [PATCH] Fixed one bug --- src/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 7cbb70c..507a974 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -214,6 +214,7 @@ void onConfirmReceiving(const uint8_t *target, const uint16_t id, const bool sta void loadConfig() { + ETS_GPIO_INTR_DISABLE(); if (!LittleFS.exists("/config.json")) saveConfig(); File file = LittleFS.open("/config.json", "r"); @@ -235,10 +236,13 @@ void loadConfig() green = json["green"]; blue = json["blue"]; file.close(); + delay(50); + ETS_GPIO_INTR_ENABLE(); } void saveConfig() { + ETS_GPIO_INTR_DISABLE(); StaticJsonDocument<512> json; json["firmware"] = firmware; json["espnowNetName"] = espnowNetName; @@ -259,6 +263,8 @@ void saveConfig() File file = LittleFS.open("/config.json", "w"); serializeJsonPretty(json, file); file.close(); + delay(50); + ETS_GPIO_INTR_ENABLE(); } void setupWebServer()