From 2235d5aa3860da2c59be9a5379f9175063147f41 Mon Sep 17 00:00:00 2001 From: IoT Manager <67171972+IoTManagerProject@users.noreply.github.com> Date: Thu, 23 Nov 2023 18:34:05 +0100 Subject: [PATCH] =?UTF-8?q?=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B1=D0=B0=D0=B3=D0=B0=20=D0=B2?= =?UTF-8?q?=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=B8=20=D0=B3=D0=B5=D0=B9=D1=82?= =?UTF-8?q?=D0=B0=20mysensors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data_svelte/flashProfile.json | 12 +++++++++ platformio.ini | 4 +-- src/modules/exec/MySensors/MySensorsGate.cpp | 26 +++++++------------- 3 files changed, 23 insertions(+), 19 deletions(-) diff --git a/data_svelte/flashProfile.json b/data_svelte/flashProfile.json index 79eca748..dea9e970 100644 --- a/data_svelte/flashProfile.json +++ b/data_svelte/flashProfile.json @@ -80,6 +80,14 @@ "path": "src/modules/sensors/Ble", "active": false }, + { + "path": "src/modules/sensors/Ble_part1", + "active": false + }, + { + "path": "src/modules/sensors/Ble_part2", + "active": false + }, { "path": "src/modules/sensors/Bme280", "active": true @@ -312,6 +320,10 @@ "path": "src/modules/display/Lcd2004", "active": true }, + { + "path": "src/modules/display/NextionUpload", + "active": false + }, { "path": "src/modules/display/Oled128", "active": false diff --git a/platformio.ini b/platformio.ini index 26e8006c..beb5f904 100644 --- a/platformio.ini +++ b/platformio.ini @@ -597,7 +597,6 @@ lib_deps = adafruit/Adafruit BMP280 Library beegee-tokyo/DHT sensor library for ESPx https://github.com/milesburton/Arduino-Temperature-Control-Library - https://github.com/tremaru/iarduino_RTC robtillaart/SHT2x@^0.1.1 WEMOS SHT3x@1.0.0 plerup/EspSoftwareSerial @@ -618,9 +617,9 @@ build_src_filter = + + + + + + + - + + + + @@ -645,6 +644,7 @@ build_src_filter = + + + + + + + + diff --git a/src/modules/exec/MySensors/MySensorsGate.cpp b/src/modules/exec/MySensors/MySensorsGate.cpp index 8e4aebde..5e147812 100644 --- a/src/modules/exec/MySensors/MySensorsGate.cpp +++ b/src/modules/exec/MySensors/MySensorsGate.cpp @@ -3,11 +3,6 @@ #include "Arduino.h" #include "MySensorsGate.h" -// временное решение -unsigned long currentMillis; -unsigned long prevMillis; -unsigned long difference; - #ifdef MYSENSORS // callback библиотеки mysensors void receive(const MyMessage& message) { @@ -58,16 +53,11 @@ String parseToString(const MyMessage& message) { class MySensorsGate : public IoTItem { private: public: - MySensorsGate(String parameters) : IoTItem(parameters) { - SerialPrint("i", "MySensors", "Gate initialized"); - } + MySensorsGate(String parameters) : IoTItem(parameters) { SerialPrint("i", "MySensors", "Gate initialized"); } - void doByInterval() { - } + void doByInterval() {} - void loop() { - loopMySensorsExecute(); - } + void loop() { loopMySensorsExecute(); } ~MySensorsGate(){}; @@ -356,6 +346,10 @@ class MySensorsNode : public IoTItem { int _minutesPassed = 0; String json = "{}"; bool dataFromNode = false; + // временное решение + unsigned long currentMillis; + unsigned long prevMillis; + unsigned long difference; public: MySensorsNode(String parameters) : IoTItem(parameters) { @@ -393,9 +387,7 @@ class MySensorsNode : public IoTItem { } // событие когда пользователь подключается приложением или веб интерфейсом к усройству - void onMqttWsAppConnectEvent() { - setNewWidgetAttributes(); - } + void onMqttWsAppConnectEvent() { setNewWidgetAttributes(); } void setNewWidgetAttributes() { if (dataFromNode) { @@ -431,4 +423,4 @@ void* getAPI_MySensorsGate(String subtype, String param) { } else { return nullptr; } -} +} \ No newline at end of file