diff --git a/wled00/FX.cpp b/wled00/FX.cpp index aeba14854..552b0f55f 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -242,7 +242,7 @@ uint16_t WS2812FX::mode_dynamic(void) { uint32_t cycleTime = 50 + (255 - SEGMENT.speed)*15; uint32_t it = now / cycleTime; - if (it != SEGENV.step) //new color + if (it != SEGENV.step && SEGMENT.speed != 0) //new color { for(uint16_t i=SEGMENT.start; i < SEGMENT.stop; i++) { if (random8() <= SEGMENT.intensity) _locked[i] = random8(); diff --git a/wled00/NpbWrapper.h b/wled00/NpbWrapper.h index a704e4269..05d738680 100644 --- a/wled00/NpbWrapper.h +++ b/wled00/NpbWrapper.h @@ -130,26 +130,25 @@ public: _pGrbw = new NeoPixelBrightnessBus(countPixels, LEDPIN); #endif _pGrbw->Begin(); - break; - - #ifdef WLED_USE_ANALOG_LEDS - //init PWM pins - PINs 5,12,13,15 are used with Magic Home LED Controller - pinMode(RPIN, OUTPUT); - pinMode(GPIN, OUTPUT); - pinMode(BPIN, OUTPUT); - switch (_type) { - case NeoPixelType_Grb: break; - #ifdef WLED_USE_5CH_LEDS - case NeoPixelType_Grbw: pinMode(WPIN, OUTPUT); pinMode(W2PIN, OUTPUT); break; - #else - case NeoPixelType_Grbw: pinMode(WPIN, OUTPUT); break; - #endif - } - analogWriteRange(255); //same range as one RGB channel - analogWriteFreq(880); //PWM frequency proven as good for LEDs + + #ifdef WLED_USE_ANALOG_LEDS + pinMode(WPIN, OUTPUT); + #ifdef WLED_USE_5CH_LEDS + pinMode(W2PIN, OUTPUT); #endif - + #endif + + break; } + + #ifdef WLED_USE_ANALOG_LEDS + //init PWM pins - PINs 5,12,13,15 are used with Magic Home LED Controller + pinMode(RPIN, OUTPUT); + pinMode(GPIN, OUTPUT); + pinMode(BPIN, OUTPUT); + analogWriteRange(255); //same range as one RGB channel + analogWriteFreq(880); //PWM frequency proven as good for LEDs + #endif } #ifdef WLED_USE_ANALOG_LEDS diff --git a/wled00/wled00.ino b/wled00/wled00.ino index a577c95d4..0d120292f 100644 --- a/wled00/wled00.ino +++ b/wled00/wled00.ino @@ -98,7 +98,7 @@ //version code in format yymmddb (b = daily build) -#define VERSION 1912232 +#define VERSION 1912291 char versionString[] = "0.9.0-b2"; diff --git a/wled00/wled19_json.ino b/wled00/wled19_json.ino index 3e135d406..802941a62 100644 --- a/wled00/wled19_json.ino +++ b/wled00/wled19_json.ino @@ -243,7 +243,7 @@ void serializeInfo(JsonObject root) leds_pin.add(LEDPIN); leds["pwr"] = strip.currentMilliamps; - leds["maxpwr"] = strip.ablMilliampsMax; + leds["maxpwr"] = (strip.currentMilliamps)? strip.ablMilliampsMax : 0; leds["maxseg"] = strip.getMaxSegments(); leds["seglock"] = false; //will be used in the future to prevent modifications to segment config