From e1b4ffa5743bf1006f8e91a87d035c363e08c951 Mon Sep 17 00:00:00 2001 From: Dmitry Borisenko <49808844+DmitryBorisenko33@users.noreply.github.com> Date: Sun, 18 Sep 2022 22:48:27 +0200 Subject: [PATCH] =?UTF-8?q?=D1=83=D0=B1=D0=B5=D1=80=D0=B0=D0=B5=D0=BC=20?= =?UTF-8?q?=D0=BB=D0=B8=D1=88=D0=BD=D0=B8=D0=B5=20serial=20print?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data_svelte/items.json | 10 ++++++---- myProfile.json | 2 +- platformio.ini | 2 +- src/modules/API.cpp | 4 ++-- src/modules/virtual/Logging/Loging.cpp | 5 ----- 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/data_svelte/items.json b/data_svelte/items.json index f78855e6..954d0f31 100644 --- a/data_svelte/items.json +++ b/data_svelte/items.json @@ -402,7 +402,7 @@ "num": 30 }, { - "name": "31. Кнопка управляющая пином (Реле)", + "name": "31. Управление пином", "type": "Writing", "subtype": "ButtonOut", "id": "btn", @@ -455,16 +455,18 @@ "num": 34 }, { - "name": "35. PWM ESP8266", + "name": "35. PWM ESP32", "type": "Writing", - "subtype": "Pwm8266", + "subtype": "Pwm32", "id": "pwm", "widget": "range", "page": "Кнопки", "descr": "PWM", "int": 0, - "pin": 15, + "pin": 2, "freq": 5000, + "ledChannel": 2, + "PWM_resolution": 10, "val": 0, "apin": -1, "num": 35 diff --git a/myProfile.json b/myProfile.json index b807c1e6..5b57857e 100644 --- a/myProfile.json +++ b/myProfile.json @@ -21,7 +21,7 @@ }, "projectProp": { "platformio": { - "default_envs": "esp8266_4mb", + "default_envs": "esp32_4mb", "data_dir": "data_svelte" } }, diff --git a/platformio.ini b/platformio.ini index ef5b920a..72b9330b 100644 --- a/platformio.ini +++ b/platformio.ini @@ -41,7 +41,7 @@ build_src_filter = ${env:esp32_4mb_fromitems.build_src_filter} [platformio] -default_envs = esp8266_4mb +default_envs = esp32_4mb data_dir = data_svelte [common_env_data] diff --git a/src/modules/API.cpp b/src/modules/API.cpp index 9ee02105..b2f9af1f 100644 --- a/src/modules/API.cpp +++ b/src/modules/API.cpp @@ -22,7 +22,7 @@ void* getAPI_ButtonOut(String subtype, String params); void* getAPI_IoTServo(String subtype, String params); void* getAPI_Mcp23017(String subtype, String params); void* getAPI_Mp3(String subtype, String params); -void* getAPI_Pwm8266(String subtype, String params); +void* getAPI_Pwm32(String subtype, String params); void* getAPI_TelegramLT(String subtype, String params); void* getAPI_Lcd2004(String subtype, String params); @@ -50,7 +50,7 @@ if ((tmpAPI = getAPI_ButtonOut(subtype, params)) != nullptr) return tmpAPI; if ((tmpAPI = getAPI_IoTServo(subtype, params)) != nullptr) return tmpAPI; if ((tmpAPI = getAPI_Mcp23017(subtype, params)) != nullptr) return tmpAPI; if ((tmpAPI = getAPI_Mp3(subtype, params)) != nullptr) return tmpAPI; -if ((tmpAPI = getAPI_Pwm8266(subtype, params)) != nullptr) return tmpAPI; +if ((tmpAPI = getAPI_Pwm32(subtype, params)) != nullptr) return tmpAPI; if ((tmpAPI = getAPI_TelegramLT(subtype, params)) != nullptr) return tmpAPI; if ((tmpAPI = getAPI_Lcd2004(subtype, params)) != nullptr) return tmpAPI; return nullptr; diff --git a/src/modules/virtual/Logging/Loging.cpp b/src/modules/virtual/Logging/Loging.cpp index bd757d2f..db48b3c4 100644 --- a/src/modules/virtual/Logging/Loging.cpp +++ b/src/modules/virtual/Logging/Loging.cpp @@ -44,7 +44,6 @@ class Loging : public IoTItem { } void doByInterval() { - SerialPrint("E", F("Loging"), "----------------------start loging cycle----------------------------"); //если объект логгирования не был создан if (!isItemExist(logid)) { SerialPrint("E", F("Loging"), "'" + id + "' loging object not exist, return"); @@ -102,7 +101,6 @@ class Loging : public IoTItem { } //запускаем процедуру удаления старых файлов если память переполняется deleteLastFile(); - SerialPrint("E", F("Loging"), "----------------------compl loging cycle----------------------------"); } void createNewFileWithData(String &logData) { @@ -150,8 +148,6 @@ class Loging : public IoTItem { } void sendChart() { - SerialPrint("E", F("Loging"), "----------------------start send chart----------------------------"); - String dir = "/lg/" + id; filesList = getFilesList(dir); @@ -189,7 +185,6 @@ class Loging : public IoTItem { if (noData) { cleanChart(); } - SerialPrint("E", F("Loging"), "----------------------compl send chart----------------------------"); } void cleanChart() {