-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLogicPanelControl.h
52 lines (40 loc) · 1.29 KB
/
LogicPanelControl.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
// AstroDuinio Project. Copyright (c) Licensed under GNU General Public License, version 3.0
// Source: https://github.com/tgiphil/AstroDuino
#ifndef _LOGICPANELCONTROL_h
#define _LOGICPANELCONTROL_h
#if defined(ARDUINO) && ARDUINO >= 100
#include "arduino.h"
#else
#include "WProgram.h"
#endif
#include "LogicDisplay.h"
#define DEFAULT_REFRESH_RATE 10
#define FRONT_LOGIC_PANEL_PIN 6
#define REAR_LOGIC_PANEL_PIN 7
#define FRONT_LOGIC_PANEL_LEDS_COUNT 80
#define REAR_LOGIC_PANEL_LEDS_COUNT 96
class LogicPanelControlClass
{
public:
void Setup();
void Update();
void Enable(byte panel);
void Disable(byte panel);
void SetRefreshRate(int milli);
void SetRefreshRate(byte panel, int milli);
void SetSequenceLength(byte panel, byte len);
void UpdateMap(byte panel, byte index, byte led);
void UpdateColorSequence(byte panel, byte seq, byte index, byte value);
void SetEvent(byte x, char c, byte y);
void SetDefaultSequence();
void SetDefaultMapV1();
void SetBrightness(byte brightness);
protected:
unsigned long LastTick;
unsigned int RefreshRate;
unsigned int Brightness;
LogicDisplayClass<FRONT_LOGIC_PANEL_LEDS_COUNT, FRONT_LOGIC_PANEL_PIN> FrontPanel;
LogicDisplayClass<REAR_LOGIC_PANEL_LEDS_COUNT, REAR_LOGIC_PANEL_PIN> RearPanel;
};
extern LogicPanelControlClass LogicPanelControl;
#endif