From 8eb3fd5ae6355d4f05181a2bcc71858ed6b55f96 Mon Sep 17 00:00:00 2001 From: biver Date: Thu, 28 Apr 2022 10:05:28 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B0=D1=81=D1=81=D1=82=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D1=8F=D0=B5=D0=BC=20=D0=BC=D0=B0=D1=80=D0=BA=D0=B5=D1=80?= =?UTF-8?q?=D1=8B=20=D0=B4=D0=BB=D1=8F=20=D0=BF=D0=BE=D0=BD=D0=B8=D0=BC?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D1=8F=20=D0=BF=D1=80=D0=BE=D1=86=D0=B5=D1=81?= =?UTF-8?q?=D1=81=D0=B0=20=D0=BE=D1=87=D0=B8=D1=81=D1=82=D0=BA=D0=B8=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D1=83=D1=80=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/classes/IoTRTC.h | 1 + src/ESPConfiguration.cpp | 2 ++ src/WsServer.cpp | 2 ++ src/classes/IoTRTC.cpp | 4 ++++ 4 files changed, 9 insertions(+) diff --git a/include/classes/IoTRTC.h b/include/classes/IoTRTC.h index bed063dc..b2163aaf 100644 --- a/include/classes/IoTRTC.h +++ b/include/classes/IoTRTC.h @@ -5,6 +5,7 @@ class iarduino_RTC_NTP: public iarduino_RTC_BASE { public: iarduino_RTC_NTP(); + ~iarduino_RTC_NTP(); void begin(void); uint8_t funcReadTimeIndex(uint8_t i); void funcWriteTimeIndex(uint8_t i, uint8_t j); diff --git a/src/ESPConfiguration.cpp b/src/ESPConfiguration.cpp index 04fdc809..2c767798 100644 --- a/src/ESPConfiguration.cpp +++ b/src/ESPConfiguration.cpp @@ -34,6 +34,7 @@ void configure(String path) { // пробуем спросить драйвер RTC iarduino_RTC_BASE* rtctmp = myIoTItem->getRtcDriver(); if (rtctmp) { + Serial.println("Start delete watch objClass"); delete watch->objClass; watch->objClass = rtctmp; int valPeriod_save = watch->valPeriod; @@ -54,6 +55,7 @@ void configure(String path) { void clearConfigure() { Serial.printf("Start clearing config\n"); for (std::list::iterator it=IoTItems.begin(); it != IoTItems.end(); ++it) { + Serial.printf("Start delete iotitem %s \n", (*it)->getID().c_str()); if (*it) delete *it; } IoTItems.clear(); diff --git a/src/WsServer.cpp b/src/WsServer.cpp index 0b3a2d7f..599e971e 100644 --- a/src/WsServer.cpp +++ b/src/WsServer.cpp @@ -69,7 +69,9 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t* payload, size_t length) //**сохранение**// if (headerStr == "/gifnoc|") { writeFileUint8tByFrames("config.json", payload, length, headerLenth, 256); + Serial.println("Start clear"); clearConfigure(); + Serial.println("Start config"); configure("/config.json"); } //**сохранение**// diff --git a/src/classes/IoTRTC.cpp b/src/classes/IoTRTC.cpp index 0c310fdb..94b6c741 100644 --- a/src/classes/IoTRTC.cpp +++ b/src/classes/IoTRTC.cpp @@ -40,3 +40,7 @@ void iarduino_RTC_NTP::funcWriteTimeIndex(uint8_t i, uint8_t j) { } +iarduino_RTC_NTP::~iarduino_RTC_NTP() { + +} +