-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathAnimatorNull.h
More file actions
40 lines (26 loc) · 818 Bytes
/
AnimatorNull.h
File metadata and controls
40 lines (26 loc) · 818 Bytes
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
#ifndef NULL_ANIMATOR_H
#define NULL_ANIMATOR_H
#include <Arduino.h>
#include "IDisplayDriver.h"
#include "IAnimator.h"
class NullAnimator: public IAnimator
{
protected:
IDisplayDriver *driver;
uint8_t red = 255;
uint8_t green = 255;
uint8_t blue = 255;
public:
NullAnimator(IDisplayDriver *driver): driver(driver) { }
virtual void setRed(uint8_t red);
virtual void setGreen(uint8_t green);
virtual void setBlue(uint8_t blue);
virtual void setRGB(uint8_t red, uint8_t green, uint8_t blue);
virtual void setDots(uint8_t count);
virtual void setPixel(uint8_t x, uint8_t y);
virtual void clearPixel(uint8_t x, uint8_t y);
virtual void commit();
private:
void updateColors(uint32_t oldColor, uint32_t newColor);
};
#endif /* !NULL_ANIMATOR_H */