Skip to content

Commit 45b012b

Browse files
committed
C3 compile fix
1 parent 9700147 commit 45b012b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

wled00/FX.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6293,7 +6293,7 @@ uint16_t mode_particlevortex(void) {
62936293
return mode_static(); // something went wrong, no data!
62946294

62956295
PartSys->updateSystem(SEG_W, SEG_H); // update system properties (dimensions and data pointers)
6296-
uint32_t spraycount = max(1U, min(PartSys->numSources, (uint32_t)(1 + (SEGMENT.custom1 >> 5)))); // number of sprays to display, 1-8
6296+
uint32_t spraycount = max((uint32_t)1, min(PartSys->numSources, (uint32_t)(1 + (SEGMENT.custom1 >> 5)))); // number of sprays to display, 1-8
62976297
#ifdef ESP8266
62986298
for (i = 1; i < 4; i++) { // need static particles in the center to reduce blinking (would be black every other frame without this hack), just set them there fixed
62996299
int partindex = (int)PartSys->usedParticles - (int)i;

wled00/FXparticleSystem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ void ParticleSystem2D::render() {
655655
continue;
656656
// generate RGB values for particle
657657
if (fireIntesity) { // fire mode
658-
brightness = min((uint32_t)particles[i].ttl * (3 + (fireIntesity >> 5)) + 5, 255U);
658+
brightness = min((uint32_t)particles[i].ttl * (3 + (fireIntesity >> 5)) + 5, (uint32_t)255);
659659
baseRGB = ColorFromPaletteWLED(SEGPALETTE, brightness, 255, LINEARBLEND_NOWRAP);
660660
} else {
661661
brightness = min(particles[i].ttl << 1, 255);

0 commit comments

Comments
 (0)