WLED 0.15.0-b4 release

- LED settings update (limit to available outputs)
- minor fixes
This commit is contained in:
Blaz Kristan
2024-06-29 16:36:27 +02:00
parent f0e4dd90ee
commit 7b248c8fb2
15 changed files with 2021 additions and 1905 deletions

View File

@@ -58,7 +58,11 @@ private:
bool sensorPinState[PIR_SENSOR_MAX_SENSORS] = {LOW}; // current PIR sensor pin state
// configurable parameters
#if PIR_SENSOR_PIN < 0
bool enabled = false; // PIR sensor disabled
#else
bool enabled = true; // PIR sensor enabled
#endif
int8_t PIRsensorPin[PIR_SENSOR_MAX_SENSORS] = {PIR_SENSOR_PIN}; // PIR sensor pin
uint32_t m_switchOffDelay = PIR_SENSOR_OFF_SEC*1000; // delay before switch off after the sensor state goes LOW (10min)
uint8_t m_onPreset = 0; // on preset

View File

@@ -122,9 +122,9 @@ class AutoSaveUsermod : public Usermod {
* Da loop.
*/
void loop() {
if (!autoSaveAfterSec || !enabled || strip.isUpdating() || currentPreset>0) return; // setting 0 as autosave seconds disables autosave
static unsigned long lastRun = 0;
unsigned long now = millis();
if (!autoSaveAfterSec || !enabled || currentPreset>0 || (strip.isUpdating() && now - lastRun < 240)) return; // setting 0 as autosave seconds disables autosave
uint8_t currentMode = strip.getMainSegment().mode;
uint8_t currentPalette = strip.getMainSegment().palette;