ws2812-achterbahn/src/fx_shootingstar.h

28 lines
606 B
C++

#ifndef FX_SHOOTINGSTAR_H
#define FX_SHOOTINGSTAR_H
#include <Adafruit_NeoPixel.h>
#include <math.h>
#include "effect.h"
class FX_ShootingStar : public Effect
{
public:
FX_ShootingStar(int numpixels,Adafruit_NeoPixel *strip,uint8_t *height);
FX_ShootingStar();
void updateRoutine(float updatedelayms);
void updateGraphics();
uint32_t Wheel(byte WheelPos,float brightness);
bool active();
private:
int _numpixels;
Adafruit_NeoPixel *_strip;
long _starttime;
uint8_t _brightness;
long _duration;
uint8_t *_height;
int _pos;
float _vel;
};
#endif