From 0a165026eb922f72936d2fef1ab4a7144d82d3f9 Mon Sep 17 00:00:00 2001 From: Dmitry Borisenko <49808844+DmitryBorisenko33@users.noreply.github.com> Date: Mon, 19 Sep 2022 02:12:43 +0200 Subject: [PATCH] 8266 --- data_svelte/items.json | 8 +++----- myProfile.json | 2 +- platformio.ini | 2 +- src/modules/API.cpp | 4 ++-- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/data_svelte/items.json b/data_svelte/items.json index 954d0f31..6eb1a177 100644 --- a/data_svelte/items.json +++ b/data_svelte/items.json @@ -455,18 +455,16 @@ "num": 34 }, { - "name": "35. PWM ESP32", + "name": "35. PWM ESP8266", "type": "Writing", - "subtype": "Pwm32", + "subtype": "Pwm8266", "id": "pwm", "widget": "range", "page": "Кнопки", "descr": "PWM", "int": 0, - "pin": 2, + "pin": 15, "freq": 5000, - "ledChannel": 2, - "PWM_resolution": 10, "val": 0, "apin": -1, "num": 35 diff --git a/myProfile.json b/myProfile.json index 5b57857e..b807c1e6 100644 --- a/myProfile.json +++ b/myProfile.json @@ -21,7 +21,7 @@ }, "projectProp": { "platformio": { - "default_envs": "esp32_4mb", + "default_envs": "esp8266_4mb", "data_dir": "data_svelte" } }, diff --git a/platformio.ini b/platformio.ini index 72b9330b..ef5b920a 100644 --- a/platformio.ini +++ b/platformio.ini @@ -41,7 +41,7 @@ build_src_filter = ${env:esp32_4mb_fromitems.build_src_filter} [platformio] -default_envs = esp32_4mb +default_envs = esp8266_4mb data_dir = data_svelte [common_env_data] diff --git a/src/modules/API.cpp b/src/modules/API.cpp index b2f9af1f..9ee02105 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_Pwm32(String subtype, String params); +void* getAPI_Pwm8266(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_Pwm32(subtype, params)) != nullptr) return tmpAPI; +if ((tmpAPI = getAPI_Pwm8266(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;