-
-
Notifications
You must be signed in to change notification settings - Fork 100
Expand file tree
/
Copy pathLEDStrip.h
More file actions
53 lines (43 loc) · 1.22 KB
/
LEDStrip.h
File metadata and controls
53 lines (43 loc) · 1.22 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
48
49
50
51
52
53
/*---------------------------------------------------------*\
| Definitions for Generic LED Strip Interface |
| |
| Adam Honse (calcprogrammer1@gmail.com), 12/11/2016 |
\*---------------------------------------------------------*/
#ifndef LED_STRIP_H
#define LED_STRIP_H
#include "net_port.h"
#include "serial_port.h"
#include "VisualizerDefines.h"
#ifndef TRUE
#define TRUE true
#define FALSE false
#endif
class LEDStrip
{
public:
LEDStrip();
~LEDStrip();
void Initialize(char* ledstring);
void InitializeHuePlus(char * ledstring);
void InitializeSerial(char* portname, int baud);
void InitializeUDP(char* clientname, char* port);
char* GetLEDString();
void SetNumLEDs(int numleds);
void SetLEDs(COLORREF pixels[64][256]);
void SetLEDsXmas(COLORREF pixels[64][256]);
void SetLEDsHuePlus(COLORREF pixels[64][256]);
private:
int baud_rate;
int num_leds;
int fans;
int channel;
const int hueSize = 125;
int * LEDStripXIndex;
int * LEDStripYIndex;
char led_string[1024];
char port_name[128];
char client_name[1024];
serial_port *serialport;
net_port *udpport;
};
#endif