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
|
### 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
|
#### Build 2012101
|
||||||
|
|
||||||
- Fixed preset cycle default duration rounded down to nearest 10sec interval (#1458)
|
- 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
|
const uint16_t customMappingSize = sizeof(customMappingTable)/sizeof(uint16_t); //30 in example
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef PWM_INDEX
|
||||||
|
#define PWM_INDEX 0
|
||||||
|
#endif
|
||||||
|
|
||||||
void WS2812FX::init(bool supportWhite, uint16_t countPixels, bool skipFirst)
|
void WS2812FX::init(bool supportWhite, uint16_t countPixels, bool skipFirst)
|
||||||
{
|
{
|
||||||
if (supportWhite == _useRgbw && countPixels == _length && _skipFirstMode == skipFirst) return;
|
if (supportWhite == _useRgbw && countPixels == _length && _skipFirstMode == skipFirst) return;
|
||||||
@ -957,7 +961,7 @@ void WS2812FX::setRgbwPwm(void) {
|
|||||||
_analogLastShow = nowUp;
|
_analogLastShow = nowUp;
|
||||||
|
|
||||||
RgbwColor c;
|
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;
|
c.R = col >> 16; c.G = col >> 8; c.B = col; c.W = col >> 24;
|
||||||
|
|
||||||
byte b = getBrightness();
|
byte b = getBrightness();
|
||||||
|
@ -91,6 +91,7 @@ void deserializeConfig() {
|
|||||||
CJSON(strip.ablMilliampsMax, hw_led[F("maxpwr")]);
|
CJSON(strip.ablMilliampsMax, hw_led[F("maxpwr")]);
|
||||||
CJSON(strip.milliampsPerLed, hw_led[F("ledma")]);
|
CJSON(strip.milliampsPerLed, hw_led[F("ledma")]);
|
||||||
CJSON(strip.reverseMode, hw_led[F("rev")]);
|
CJSON(strip.reverseMode, hw_led[F("rev")]);
|
||||||
|
CJSON(strip.rgbwMode, hw_led[F("rgbwm")]);
|
||||||
|
|
||||||
JsonObject hw_led_ins_0 = hw_led[F("ins")][0];
|
JsonObject hw_led_ins_0 = hw_led[F("ins")][0];
|
||||||
//bool hw_led_ins_0_en = hw_led_ins_0[F("en")]; // true
|
//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("maxpwr")] = strip.ablMilliampsMax;
|
||||||
hw_led[F("ledma")] = strip.milliampsPerLed;
|
hw_led[F("ledma")] = strip.milliampsPerLed;
|
||||||
hw_led[F("rev")] = strip.reverseMode;
|
hw_led[F("rev")] = strip.reverseMode;
|
||||||
|
hw_led[F("rgbwm")] = strip.rgbwMode;
|
||||||
|
|
||||||
JsonArray hw_led_ins = hw_led.createNestedArray("ins");
|
JsonArray hw_led_ins = hw_led.createNestedArray("ins");
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// version code in format yymmddb (b = daily build)
|
// 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
|
//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
|
||||||
|
Loading…
Reference in New Issue
Block a user