From 35b54e2f88281e54dfd8cbd881e88a13edfe7ba2 Mon Sep 17 00:00:00 2001 From: cschwinne Date: Sun, 20 Sep 2020 16:40:32 +0200 Subject: [PATCH] Add CY=2 for cycle toggling (closes #1174) --- CHANGELOG.md | 6 ++++++ readme.md | 4 ++-- wled00/NpbWrapper.h | 4 ++++ wled00/set.cpp | 4 +++- wled00/wled.h | 2 +- 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f37e14000..261f80a31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ### Development versions after the 0.10.2 release +#### Build 2009201 + +- Added support for preset cycle toggling using CY=2 +- Added ESP32 touch pin support (#1190) +- Fixed modem sleep on ESP8266 (#1184) + #### Build 2009200 - Increased available heap memory by 4kB diff --git a/readme.md b/readme.md index 2d62bc12f..2080fd453 100644 --- a/readme.md +++ b/readme.md @@ -97,7 +97,7 @@ If WLED really brightens up your every day, you can [![](https://img.shields.io/ *Disclaimer:* -If you are sensitive to photoeleptic seizures it is not recommended that you use this software. +If you are sensitive to photosensitive epilepsy it is not recommended that you use this software. In case you still want to try, don't use strobe, lighting or noise modes or high effect speed settings. -As per the MIT license, i assume no liability for any damage to you or any other person or equipment. +As per the MIT license, I assume no liability for any damage to you or any other person or equipment. diff --git a/wled00/NpbWrapper.h b/wled00/NpbWrapper.h index 2fa6ab406..ac72c89bf 100644 --- a/wled00/NpbWrapper.h +++ b/wled00/NpbWrapper.h @@ -21,6 +21,10 @@ #define BTNPIN 0 //button pin. Needs to have pullup (gpio0 recommended) #endif +#ifndef TOUCHPIN +//#define TOUCHPIN T0 //touch pin. Behaves the same as button. ESP32 only. +#endif + #ifndef IR_PIN #define IR_PIN 4 //infrared pin (-1 to disable) MagicHome: 4, H801 Wifi: 0 #endif diff --git a/wled00/set.cpp b/wled00/set.cpp index 617e2357c..33cf3a47a 100644 --- a/wled00/set.cpp +++ b/wled00/set.cpp @@ -471,7 +471,9 @@ bool handleSet(AsyncWebServerRequest *request, const String& req) pos = req.indexOf(F("CY=")); if (pos > 0) { - presetCyclingEnabled = (req.charAt(pos+3) != '0'); + char cmd = req.charAt(pos+3); + if (cmd == '2') presetCyclingEnabled = !presetCyclingEnabled; + else presetCyclingEnabled = (cmd != '0'); presetCycCurr = presetCycleMin; } diff --git a/wled00/wled.h b/wled00/wled.h index bfe91bc49..2d22c0f10 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -8,7 +8,7 @@ */ // version code in format yymmddb (b = daily build) -#define VERSION 2009200 +#define VERSION 2009201 // ESP8266-01 (blue) got too little storage space to work with all features of WLED. To use it, you must use ESP8266 Arduino Core v2.4.2 and the setting 512K(No SPIFFS).