-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCircuitBox.h
More file actions
47 lines (39 loc) · 1.07 KB
/
CircuitBox.h
File metadata and controls
47 lines (39 loc) · 1.07 KB
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
#include <FastLED.h>
#include "Led.h"
#include "configs.h"
//Class for general circuit control
class CircuitBox {
private:
uint8_t controlSwitchStatus;
bool securitySwitchStatus;
int potValue;
//Light Sensor Module used at digital mode (not analog!!!)
bool lightSensorStatus;
public:
Led *indicatorLed;
uint8_t patternCount;
uint8_t paletteCount;
uint8_t patternCounter = 0;
uint8_t paletteCounter = 0;
uint8_t max_Brightness = MAX_MAX_BRIGHTNESS;
short int current_Brightness;
CRGBPalette16 currentPalette;
CRGBPalette16 targetPalette;
TBlendType currentBlending;
CircuitBox();
bool didPotChange();
void handleBrightnessChange();
void handlePaletteChange();
void handlePatternChange();
void handleLightSensor(int);
uint8_t getControlSwitchStatus() const;
bool getSecuritySwitchStatus() const;
void announceControlSwitchChange();
void announceSecuritySwitchChange();
void print() const;
void modifyBrightness(short);
void modifyPattern(short);
void modifyPalette(short);
void changePattern(int id);
void changePalette(int id);
};