forked from bracci/Qlockthree
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Renderer.h
90 lines (80 loc) · 1.91 KB
/
Renderer.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/**
Renderer
Diese Klasse rendert die Woerter auf die Matrix.
@mc Arduino/RBBB
@autor Christian Aschoff / caschoff _AT_ mac _DOT_ com
@version 1.5
@created 21.1.2013
*/
#ifndef RENDERER_H
#define RENDERER_H
#include "Arduino.h"
#include "Configuration.h"
enum eLanguage : byte {
#ifdef ENABLE_LANGUAGE_DE
LANGUAGE_DE_DE,
LANGUAGE_DE_SW,
LANGUAGE_DE_BA,
LANGUAGE_DE_SA,
#endif
#ifdef ENABLE_LANGUAGE_DE_MKF
LANGUAGE_DE_MKF_DE,
LANGUAGE_DE_MKF_SW,
LANGUAGE_DE_MKF_BA,
LANGUAGE_DE_MKF_SA,
#endif
#ifdef ENABLE_LANGUAGE_D3
LANGUAGE_D3,
#endif
#ifdef ENABLE_LANGUAGE_CH
LANGUAGE_CH,
LANGUAGE_CH_X,
#endif
#ifdef ENABLE_LANGUAGE_EN
LANGUAGE_EN,
#endif
#ifdef ENABLE_LANGUAGE_FR
LANGUAGE_FR,
#endif
#ifdef ENABLE_LANGUAGE_IT
LANGUAGE_IT,
#endif
#ifdef ENABLE_LANGUAGE_NL
LANGUAGE_NL,
#endif
#ifdef ENABLE_LANGUAGE_ES
LANGUAGE_ES,
#endif
LANGUAGE_COUNT,
};
class Renderer {
public:
enum eTextPos : byte {
TEXT_POS_TOP,
TEXT_POS_MIDDLE = 2,
TEXT_POS_BOTTOM = 5
};
Renderer();
void setMinutes(char hours, byte minutes, byte language, word matrix[16]);
void setCorners(byte minutes, boolean cw, word matrix[16]);
void activateAlarmLed(word matrix[16]);
void clearEntryWords(byte language, word matrix[16]);
void clearScreenBuffer(word matrix[16]);
void setAllScreenBuffer(word matrix[16]);
void setMenuText(const char* menuText, eTextPos textPos, word matrix[16]);
void activateAMPM(byte hours, byte language, word matrix[16]);
private:
void setHours(byte hours, boolean glatt, byte language, word matrix[16]);
boolean isNumber(char symbol);
// Spezialfaelle
#ifdef ENABLE_LANGUAGE_FR
void FR_hours(byte hours, word matrix[16]);
#endif
#ifdef ENABLE_LANGUAGE_IT
void IT_hours(byte hours, word matrix[16]);
#endif
#ifdef ENABLE_LANGUAGE_ES
void ES_hours(byte hours, word matrix[16]);
#endif
};
#endif