forked from bracci/Qlockthree
-
Notifications
You must be signed in to change notification settings - Fork 0
/
IRTranslator.h
64 lines (55 loc) · 1.69 KB
/
IRTranslator.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
55
56
57
58
59
60
61
62
63
64
/**
IRTranslator
Abstrakte Klasse fuer die Umsetzung von Fernbedienungs-Codes.
@mc Arduino/RBBB
@autor Christian Aschoff / caschoff _AT_ mac _DOT_ com
@version 1.1
@created 7.2.2015
*/
#ifndef IRTRANSLATOR_H
#define IRTRANSLATOR_H
#include "Arduino.h"
#include "Settings.h"
#include "Modes.h"
#include "Colors.h"
#define REMOTE_BUTTON_UNDEFINED 0
// diese Buttons braucht man haeufig und sollten alle Fernbedienungen koennen...
#define REMOTE_BUTTON_MODE 1
#define REMOTE_BUTTON_MINUTE_PLUS 2
#define REMOTE_BUTTON_HOUR_PLUS 3
#define REMOTE_BUTTON_BRIGHTER 4
#define REMOTE_BUTTON_DARKER 5
#define REMOTE_BUTTON_EXTMODE 6
#define REMOTE_BUTTON_TOGGLEBLANK 7
#define REMOTE_BUTTON_BLANK 8
#define REMOTE_BUTTON_RESUME 9
#define REMOTE_BUTTON_SETCOLOR 10
// ... weitere koennen dann die konkreten Implementierungen hinzufuegen.
#define REMOTE_BUTTON_START_YOUR_OWN_AT 100
// für CLT Remote
#define REMOTE_BUTTON_SETMODE 101
#define REMOTE_BUTTON_REGION 102
#define REMOTE_BUTTON_LDR 103
#define REMOTE_BUTTON_TIME_H_PLUS 104
#define REMOTE_BUTTON_TIME_H_MINUS 105
#define REMOTE_BUTTON_TIME_M_PLUS 106
#define REMOTE_BUTTON_TIME_M_MINUS 107
#define REMOTE_BUTTON_TRANSITION 108
#define REMOTE_BUTTON_SECONDS 109
class IRTranslator {
public:
virtual void printSignature();
virtual byte buttonForCode(unsigned long code);
eColors getColor();
Mode getMode();
byte getTransition();
protected:
void setColor(eColors);
void setMode(Mode mode);
void setTransition(byte transition);
private:
byte _transition;
eColors _color;
Mode _mode;
};
#endif