forked from Beanow/Arduino-Shift-Light
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPixelAnimator.h
54 lines (45 loc) · 1.06 KB
/
PixelAnimator.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef PixelAnimator_h
#define PixelAnimator_h
#include <FastLED.h>
#include "Config.h"
#include "ColorPicker.h"
#include "power_mgt.h"
#include "_defines.h"
class RPMAnimation {
public:
enum animations: uint8_t {
LeftToRight = 0,
RightToLeft = 1,
Outward = 2,
Inward = 3,
Full = 4
};
};
class PixelAnimator {
public:
PixelAnimator(Config* config);
void
show(),
setup(),
updateColors(),
setBrightness(uint8_t brightness),
setFill(CRGB color),
setEdges(CRGB color),
setRPM(uint16_t rpm),
showBlockingRunlight(CRGB color, uint16_t time=ANIM_MED),
showSegmentPreview(uint8_t segment1, uint8_t segment2, uint8_t blackSegment=0, bool halved=false);
private:
Config* CONFIG;
uint8_t targetBrightness;
bool passedLow;
CRGB CLow;
CRGB CPart1;
CRGB CPart2;
CRGB CPart3;
CRGB CFlash1;
CRGB CFlash2;
CRGB** CSegmentsFull;
CRGB** CSegmentsHalved;
CRGB colorFor(uint8_t index, bool halved=false);
};
#endif