Skip to content

Commit

Permalink
added ifdefs
Browse files Browse the repository at this point in the history
  • Loading branch information
DedeHai committed Jan 15, 2025
1 parent db4eae7 commit 3aa8fa5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wled00/FX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7944,7 +7944,7 @@ uint16_t mode_particlevolcano(void) {
PartSys->setBounceY(true);
PartSys->setGravity(); // enable with default gforce
PartSys->setKillOutOfBounds(true); // out of bounds particles dont return (except on top, taken care of by gravity setting)
PartSys->setMotionBlur(220); // anable motion blur
PartSys->setMotionBlur(230); // anable motion blur

numSprays = min(PartSys->numSources, (uint32_t)NUMBEROFSOURCES); // number of sprays
for (i = 0; i < numSprays; i++) {
Expand Down Expand Up @@ -9826,7 +9826,7 @@ uint16_t mode_particleChase(void) {
// Particle System settings
PartSys->updateSystem(); // update system properties (dimensions and data pointers)
PartSys->setColorByPosition(SEGMENT.check3);
PartSys->setMotionBlur(SEGMENT.custom3 << 3); // anable motion blur
PartSys->setMotionBlur((SEGMENT.custom3 + 1) << 3); // anable motion blur
// uint8_t* basehue = (PartSys->PSdataEnd + 2); //assign data pointer

uint32_t settingssum = SEGMENT.speed + SEGMENT.intensity + SEGMENT.custom1 + SEGMENT.custom2 + SEGMENT.check1 + SEGMENT.check2 + SEGMENT.check3 + PartSys->getAvailableParticles(); // note: getAvailableParticles is used to enforce update during transitions
Expand Down
3 changes: 3 additions & 0 deletions wled00/FXparticleSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
- change passing particle pointers to references (if possible)
-add underscore to private variables
*/
#ifdef WLED_DISABLE_2D
#define WLED_DISABLE_PARTICLESYSTEM2D
#endif

#if !(defined(WLED_DISABLE_PARTICLESYSTEM2D) && defined(WLED_DISABLE_PARTICLESYSTEM1D)) // not both disabled
#include "FXparticleSystem.h"
Expand Down
4 changes: 4 additions & 0 deletions wled00/FXparticleSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
Licensed under the EUPL v. 1.2 or later
*/

#ifdef WLED_DISABLE_2D
#define WLED_DISABLE_PARTICLESYSTEM2D
#endif

#if !(defined(WLED_DISABLE_PARTICLESYSTEM2D) && defined(WLED_DISABLE_PARTICLESYSTEM1D)) // not both disabled

#include <stdint.h>
Expand Down

0 comments on commit 3aa8fa5

Please sign in to comment.