Fixed RGBW mode not saved between reboots (fixes #1457)
This commit is contained in:
parent
153e6b56ba
commit
b1a7fe0f80
@ -2,6 +2,12 @@
|
||||
|
||||
### Development versions after 0.11.0 release
|
||||
|
||||
#### Build 2012130
|
||||
|
||||
- Fixed RGBW mode not saved between reboots (fixes #1457)
|
||||
- Added brightness scaling in palette function for default (PR #1484)
|
||||
-
|
||||
|
||||
#### Build 2012101
|
||||
|
||||
- Fixed preset cycle default duration rounded down to nearest 10sec interval (#1458)
|
||||
|
@ -44,6 +44,10 @@ const uint16_t customMappingTable[] = {
|
||||
const uint16_t customMappingSize = sizeof(customMappingTable)/sizeof(uint16_t); //30 in example
|
||||
#endif
|
||||
|
||||
#ifndef PWM_INDEX
|
||||
#define PWM_INDEX 0
|
||||
#endif
|
||||
|
||||
void WS2812FX::init(bool supportWhite, uint16_t countPixels, bool skipFirst)
|
||||
{
|
||||
if (supportWhite == _useRgbw && countPixels == _length && _skipFirstMode == skipFirst) return;
|
||||
@ -957,7 +961,7 @@ void WS2812FX::setRgbwPwm(void) {
|
||||
_analogLastShow = nowUp;
|
||||
|
||||
RgbwColor c;
|
||||
uint32_t col = bus->GetPixelColorRgbw(0);
|
||||
uint32_t col = bus->GetPixelColorRgbw(PWM_INDEX);
|
||||
c.R = col >> 16; c.G = col >> 8; c.B = col; c.W = col >> 24;
|
||||
|
||||
byte b = getBrightness();
|
||||
|
@ -91,6 +91,7 @@ void deserializeConfig() {
|
||||
CJSON(strip.ablMilliampsMax, hw_led[F("maxpwr")]);
|
||||
CJSON(strip.milliampsPerLed, hw_led[F("ledma")]);
|
||||
CJSON(strip.reverseMode, hw_led[F("rev")]);
|
||||
CJSON(strip.rgbwMode, hw_led[F("rgbwm")]);
|
||||
|
||||
JsonObject hw_led_ins_0 = hw_led[F("ins")][0];
|
||||
//bool hw_led_ins_0_en = hw_led_ins_0[F("en")]; // true
|
||||
@ -382,6 +383,7 @@ void serializeConfig() {
|
||||
hw_led[F("maxpwr")] = strip.ablMilliampsMax;
|
||||
hw_led[F("ledma")] = strip.milliampsPerLed;
|
||||
hw_led[F("rev")] = strip.reverseMode;
|
||||
hw_led[F("rgbwm")] = strip.rgbwMode;
|
||||
|
||||
JsonArray hw_led_ins = hw_led.createNestedArray("ins");
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
// version code in format yymmddb (b = daily build)
|
||||
#define VERSION 2012101
|
||||
#define VERSION 2012130
|
||||
|
||||
//uncomment this if you have a "my_config.h" file you'd like to use
|
||||
//#define WLED_USE_MY_CONFIG
|
||||
|
Loading…
Reference in New Issue
Block a user