Changed boot preset apply logic.

pull/2737/head
Blaž Kristan 2021-06-04 06:54:27 +02:00
rodzic b0bfe341df
commit 7ec09c80a5
4 zmienionych plików z 7 dodań i 6 usunięć

Wyświetl plik

@ -96,7 +96,7 @@ void handleAnalog(uint8_t b)
if (buttonType[b] == BTN_TYPE_ANALOG_INVERTED) aRead = 255 - aRead;
// remove noise & reduce frequency of UI updates
// remove noise & reduce frequency of UI updates (3*13mV)
aRead &= 0xFC;
if (oldRead[b] == aRead) return; // no change in reading

Wyświetl plik

@ -354,7 +354,7 @@ Timed-Light-Over Presets: <input name="MN" type="number" min="0" max="250"
required><br><h3>Button actions</h3><table style="margin:0 auto" id="macros">
<thead><tr><td>push<br>switch</td><td>short<br>on-&gt;off</td><td>long<br>
off-&gt;on</td><td>double<br>N/A</td></tr></thead><tbody></tbody></table><div>
For analog button set <i>duble</i> to:<ul><li>250=global brightness</li><li>
For analog button set <i>double</i> to:<ul><li>250=global brightness</li><li>
249=effect speed</li><li>248=effect intensity</li><li>247=palette</li><li>
200=primary color hue</li><li>0..32=segment X opacity</li></ul>More details: <a
href="https://github.com/Aircoookie/WLED/wiki/Macros#analog-button"

Wyświetl plik

@ -442,14 +442,15 @@ void WLED::beginStrip()
strip.setBrightness(0);
strip.setShowCallback(handleOverlayDraw);
if (bootPreset > 0) {
applyPreset(bootPreset);
} else if (turnOnAtBoot) {
if (turnOnAtBoot) {
if (briS > 0) bri = briS;
else if (bri == 0) bri = 128;
} else {
briLast = briS; bri = 0;
}
if (bootPreset > 0) {
applyPreset(bootPreset);
}
colorUpdated(NOTIFIER_CALL_MODE_INIT);
// init relay pin

Wyświetl plik

@ -8,7 +8,7 @@
*/
// version code in format yymmddb (b = daily build)
#define VERSION 2106031
#define VERSION 2106041
//uncomment this if you have a "my_config.h" file you'd like to use
//#define WLED_USE_MY_CONFIG