Merge remote-tracking branch 'origin/dev' into mdev
This commit is contained in:
@@ -168,7 +168,7 @@ lib_compat_mode = strict
|
|||||||
lib_deps =
|
lib_deps =
|
||||||
fastled/FastLED @ 3.5.0
|
fastled/FastLED @ 3.5.0
|
||||||
IRremoteESP8266 @ 2.8.2
|
IRremoteESP8266 @ 2.8.2
|
||||||
https://github.com/Aircoookie/ESPAsyncWebServer.git @ ~2.0.6
|
https://github.com/Aircoookie/ESPAsyncWebServer.git @ ~2.0.7
|
||||||
#For use of the TTGO T-Display ESP32 Module with integrated TFT display uncomment the following line
|
#For use of the TTGO T-Display ESP32 Module with integrated TFT display uncomment the following line
|
||||||
#TFT_eSPI
|
#TFT_eSPI
|
||||||
#For use SSD1306 OLED display uncomment following
|
#For use SSD1306 OLED display uncomment following
|
||||||
|
|||||||
@@ -48,8 +48,8 @@ class PWMFanUsermod : public Usermod {
|
|||||||
int8_t tachoPin = TACHO_PIN;
|
int8_t tachoPin = TACHO_PIN;
|
||||||
int8_t pwmPin = PWM_PIN;
|
int8_t pwmPin = PWM_PIN;
|
||||||
uint8_t tachoUpdateSec = 30;
|
uint8_t tachoUpdateSec = 30;
|
||||||
float targetTemperature = 25.0;
|
float targetTemperature = 35.0;
|
||||||
uint8_t minPWMValuePct = 50;
|
uint8_t minPWMValuePct = 0;
|
||||||
uint8_t numberOfInterrupsInOneSingleRotation = 2; // Number of interrupts ESP32 sees on tacho signal on a single fan rotation. All the fans I've seen trigger two interrups.
|
uint8_t numberOfInterrupsInOneSingleRotation = 2; // Number of interrupts ESP32 sees on tacho signal on a single fan rotation. All the fans I've seen trigger two interrups.
|
||||||
uint8_t pwmValuePct = 0;
|
uint8_t pwmValuePct = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,17 @@
|
|||||||
# Auto Save
|
# Auto Save
|
||||||
|
|
||||||
v2 Usermod to automatically save settings
|
v2 Usermod to automatically save settings
|
||||||
to preset number AUTOSAVE_PRESET_NUM after a change to any of
|
to preset number AUTOSAVE_PRESET_NUM after a change to any of:
|
||||||
|
|
||||||
* brightness
|
* brightness
|
||||||
* effect speed
|
* effect speed
|
||||||
* effect intensity
|
* effect intensity
|
||||||
* mode (effect)
|
* mode (effect)
|
||||||
* palette
|
* palette
|
||||||
|
|
||||||
but it will wait for AUTOSAVE_SETTLE_MS milliseconds, a "settle"
|
but it will wait for AUTOSAVE_AFTER_SEC seconds,
|
||||||
period in case there are other changes (any change will
|
a "settle" period in case there are other changes (any change will extend the "settle" window).
|
||||||
extend the "settle" window).
|
|
||||||
|
|
||||||
It will additionally load preset AUTOSAVE_PRESET_NUM at startup.
|
It will additionally load preset AUTOSAVE_PRESET_NUM at startup during the first `loop()`.
|
||||||
during the first `loop()`. Reasoning below.
|
|
||||||
|
|
||||||
AutoSaveUsermod is standalone, but if FourLineDisplayUsermod is installed, it will notify the user of the saved changes.
|
AutoSaveUsermod is standalone, but if FourLineDisplayUsermod is installed, it will notify the user of the saved changes.
|
||||||
|
|
||||||
@@ -28,10 +25,21 @@ This file should be placed in the same directory as `platformio.ini`.
|
|||||||
|
|
||||||
### Define Your Options
|
### Define Your Options
|
||||||
|
|
||||||
* `USERMOD_AUTO_SAVE` - define this to have this the Auto Save usermod included wled00\usermods_list.cpp
|
* `USERMOD_AUTO_SAVE` - define this to have this the Auto Save usermod included wled00\usermods_list.cpp
|
||||||
* `USERMOD_FOUR_LINE_DISPLAY` - define this to have this the Four Line Display mod included wled00\usermods_list.cpp - also tells this usermod that the display is available (see the Four Line Display usermod `readme.md` for more details)
|
* `AUTOSAVE_AFTER_SEC` - define the delay time after the settings auto-saving routine should be executed
|
||||||
|
* `AUTOSAVE_PRESET_NUM` - define the preset number used by autosave usermod
|
||||||
|
* `USERMOD_AUTO_SAVE_ON_BOOT` - define if autosave should be enabled on boot
|
||||||
|
* `USERMOD_FOUR_LINE_DISPLAY` - define this to have this the Four Line Display mod included wled00\usermods_list.cpp
|
||||||
|
also tells this usermod that the display is available
|
||||||
|
(see the Four Line Display usermod `readme.md` for more details)
|
||||||
|
|
||||||
You can configure auto-save parameters using Usermods settings page.
|
Example to add in platformio_override:
|
||||||
|
-D USERMOD_AUTO_SAVE
|
||||||
|
-D AUTOSAVE_AFTER_SEC=10
|
||||||
|
-D AUTOSAVE_PRESET_NUM=100
|
||||||
|
-D USERMOD_AUTO_SAVE_ON_BOOT=true
|
||||||
|
|
||||||
|
You can also configure auto-save parameters using Usermods settings page.
|
||||||
|
|
||||||
### PlatformIO requirements
|
### PlatformIO requirements
|
||||||
|
|
||||||
|
|||||||
@@ -33,9 +33,23 @@ class AutoSaveUsermod : public Usermod {
|
|||||||
bool enabled = true;
|
bool enabled = true;
|
||||||
|
|
||||||
// configurable parameters
|
// configurable parameters
|
||||||
|
#ifdef AUTOSAVE_AFTER_SEC
|
||||||
|
uint16_t autoSaveAfterSec = AUTOSAVE_AFTER_SEC;
|
||||||
|
#else
|
||||||
uint16_t autoSaveAfterSec = 15; // 15s by default
|
uint16_t autoSaveAfterSec = 15; // 15s by default
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef AUTOSAVE_PRESET_NUM
|
||||||
|
uint8_t autoSavePreset = AUTOSAVE_PRESET_NUM;
|
||||||
|
#else
|
||||||
uint8_t autoSavePreset = 250; // last possible preset
|
uint8_t autoSavePreset = 250; // last possible preset
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef USERMOD_AUTO_SAVE_ON_BOOT
|
||||||
|
bool applyAutoSaveOnBoot = USERMOD_AUTO_SAVE_ON_BOOT;
|
||||||
|
#else
|
||||||
bool applyAutoSaveOnBoot = false; // do we load auto-saved preset on boot?
|
bool applyAutoSaveOnBoot = false; // do we load auto-saved preset on boot?
|
||||||
|
#endif
|
||||||
|
|
||||||
// If we've detected the need to auto save, this will be non zero.
|
// If we've detected the need to auto save, this will be non zero.
|
||||||
unsigned long autoSaveAfter = 0;
|
unsigned long autoSaveAfter = 0;
|
||||||
|
|||||||
@@ -15,11 +15,17 @@ This file should be placed in the same directory as `platformio.ini`.
|
|||||||
|
|
||||||
### Define Your Options
|
### Define Your Options
|
||||||
|
|
||||||
* `USERMOD_ROTARY_ENCODER_UI` - define this to have this user mod included wled00\usermods_list.cpp
|
* `USERMOD_ROTARY_ENCODER_UI` - define this to have this user mod included wled00\usermods_list.cpp
|
||||||
* `USERMOD_FOUR_LINE_DISPLAY` - define this to have this the Four Line Display mod included wled00\usermods_list.cpp - also tells this usermod that the display is available (see the Four Line Display usermod `readme.md` for more details)
|
* `USERMOD_ROTARY_ENCODER_GPIO` - define the GPIO function (INPUT, INPUT_PULLUP, etc...)
|
||||||
* `ENCODER_DT_PIN` - The encoders DT pin, defaults to 12
|
* `USERMOD_FOUR_LINE_DISPLAY` - define this to have this the Four Line Display mod included wled00\usermods_list.cpp
|
||||||
* `ENCODER_CLK_PIN` - The encoders CLK pin, defaults to 14
|
also tells this usermod that the display is available
|
||||||
* `ENCODER_SW_PIN` - The encoders SW pin, defaults to 13
|
(see the Four Line Display usermod `readme.md` for more details)
|
||||||
|
* `ENCODER_DT_PIN` - The encoders DT pin, defaults to 12
|
||||||
|
* `ENCODER_CLK_PIN` - The encoders CLK pin, defaults to 14
|
||||||
|
* `ENCODER_SW_PIN` - The encoders SW pin, defaults to 13
|
||||||
|
* `USERMOD_ROTARY_ENCODER_GPIO` - The GPIO functionality:
|
||||||
|
`INPUT_PULLUP` to use internal pull-up
|
||||||
|
`INPUT` to use pull-up on the PCB
|
||||||
|
|
||||||
### PlatformIO requirements
|
### PlatformIO requirements
|
||||||
|
|
||||||
|
|||||||
@@ -110,9 +110,13 @@ public:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
pinMode(pinA, INPUT_PULLUP);
|
#ifndef USERMOD_ROTARY_ENCODER_GPIO
|
||||||
pinMode(pinB, INPUT_PULLUP);
|
#define USERMOD_ROTARY_ENCODER_GPIO INPUT_PULLUP
|
||||||
pinMode(pinC, INPUT_PULLUP);
|
#endif
|
||||||
|
pinMode(pinA, USERMOD_ROTARY_ENCODER_GPIO);
|
||||||
|
pinMode(pinB, USERMOD_ROTARY_ENCODER_GPIO);
|
||||||
|
pinMode(pinC, USERMOD_ROTARY_ENCODER_GPIO);
|
||||||
|
|
||||||
currentTime = millis();
|
currentTime = millis();
|
||||||
loopTime = currentTime;
|
loopTime = currentTime;
|
||||||
|
|
||||||
|
|||||||
@@ -278,9 +278,13 @@ public:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
pinMode(pinA, INPUT_PULLUP);
|
#ifndef USERMOD_ROTARY_ENCODER_GPIO
|
||||||
pinMode(pinB, INPUT_PULLUP);
|
#define USERMOD_ROTARY_ENCODER_GPIO INPUT_PULLUP
|
||||||
pinMode(pinC, INPUT_PULLUP);
|
#endif
|
||||||
|
pinMode(pinA, USERMOD_ROTARY_ENCODER_GPIO);
|
||||||
|
pinMode(pinB, USERMOD_ROTARY_ENCODER_GPIO);
|
||||||
|
pinMode(pinC, USERMOD_ROTARY_ENCODER_GPIO);
|
||||||
|
|
||||||
loopTime = millis();
|
loopTime = millis();
|
||||||
|
|
||||||
currentCCT = (approximateKelvinFromRGB(RGBW32(col[0], col[1], col[2], col[3])) - 1900) >> 5;
|
currentCCT = (approximateKelvinFromRGB(RGBW32(col[0], col[1], col[2], col[3])) - 1900) >> 5;
|
||||||
|
|||||||
@@ -1659,9 +1659,7 @@ void WS2812FX::loadCustomPalettes()
|
|||||||
CRGBPalette16 targetPalette;
|
CRGBPalette16 targetPalette;
|
||||||
for (int index = 0; index<10; index++) {
|
for (int index = 0; index<10; index++) {
|
||||||
char fileName[32];
|
char fileName[32];
|
||||||
strcpy_P(fileName, PSTR("/palette"));
|
sprintf_P(fileName, PSTR("/palette%d.json"), index);
|
||||||
sprintf(fileName +8, "%d", index);
|
|
||||||
strcat(fileName, ".json");
|
|
||||||
|
|
||||||
StaticJsonDocument<1536> pDoc; // barely enough to fit 72 numbers
|
StaticJsonDocument<1536> pDoc; // barely enough to fit 72 numbers
|
||||||
if (WLED_FS.exists(fileName)) {
|
if (WLED_FS.exists(fileName)) {
|
||||||
|
|||||||
@@ -319,9 +319,11 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef ABL_MILLIAMPS_DEFAULT
|
#ifndef ABL_MILLIAMPS_DEFAULT
|
||||||
#define ABL_MILLIAMPS_DEFAULT 850 // auto lower brightness to stay close to milliampere limit
|
#define ABL_MILLIAMPS_DEFAULT 850 // auto lower brightness to stay close to milliampere limit
|
||||||
#else
|
#else
|
||||||
#if ABL_MILLIAMPS_DEFAULT < 250 // make sure value is at least 250
|
#if ABL_MILLIAMPS_DEFAULT == 0 // disable ABL
|
||||||
|
#elif ABL_MILLIAMPS_DEFAULT < 250 // make sure value is at least 250
|
||||||
|
#warning "make sure value is at least 250"
|
||||||
#define ABL_MILLIAMPS_DEFAULT 250
|
#define ABL_MILLIAMPS_DEFAULT 250
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1541,7 +1541,7 @@ function requestJson(command=null)
|
|||||||
div.outerHTML = generateListItemHtml(
|
div.outerHTML = generateListItemHtml(
|
||||||
'palette',
|
'palette',
|
||||||
255-j,
|
255-j,
|
||||||
'~ Custom '+j+1+' ~',
|
'~ Custom '+j+' ~',
|
||||||
'setPalette',
|
'setPalette',
|
||||||
`<div class="lstIprev" style="${genPalPrevCss(255-j)}"></div>`
|
`<div class="lstIprev" style="${genPalPrevCss(255-j)}"></div>`
|
||||||
);
|
);
|
||||||
|
|||||||
1003
wled00/html_ui.h
1003
wled00/html_ui.h
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// version code in format yymmddb (b = daily build)
|
// version code in format yymmddb (b = daily build)
|
||||||
#define VERSION 2209261
|
#define VERSION 2210041
|
||||||
|
|
||||||
//uncomment this if you have a "my_config.h" file you'd like to use
|
//uncomment this if you have a "my_config.h" file you'd like to use
|
||||||
//#define WLED_USE_MY_CONFIG
|
//#define WLED_USE_MY_CONFIG
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
//#define WLED_DISABLE_ALEXA // saves 11kb
|
//#define WLED_DISABLE_ALEXA // saves 11kb
|
||||||
//#define WLED_DISABLE_BLYNK // saves 6kb
|
//#define WLED_DISABLE_BLYNK // saves 6kb
|
||||||
//#define WLED_DISABLE_HUESYNC // saves 4kb
|
//#define WLED_DISABLE_HUESYNC // saves 4kb
|
||||||
//#define WLED_DISABLE_INFRARED // saves 12kb
|
//#define WLED_DISABLE_INFRARED // saves 12kb, there is no pin left for this on ESP8266-01
|
||||||
#ifndef WLED_DISABLE_MQTT
|
#ifndef WLED_DISABLE_MQTT
|
||||||
#define WLED_ENABLE_MQTT // saves 12kb
|
#define WLED_ENABLE_MQTT // saves 12kb
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user