-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.js
103 lines (98 loc) · 1.3 KB
/
config.js
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
91
92
93
94
95
96
97
98
99
100
101
102
103
/**
* base on rm-hull/max7219
*
* below is what matrix|sevensegment can do
*/
const device = ['sevensegment', 'matrix'];
const commonOption = {
device: 'sevensegment',
cascaded: 2,
vertical: false,
methods: [
clear: {
deviceId: null
},
flush: {},
brightness: 7,
brightness: {
intensity: 7
},
set_byte: {
deviceId: 0,
position: 1,
value: 1,
redraw: true
},
rotate_left: {
redrawn: true
},
rotate_right: {
redrawn: true
},
scroll_left: {
redrawn: true
},
scroll_right: {
redrawn: true
}
]
};
const sevensegmentMethod = [
letter: {
deviceId: 0,
position: 1,
char: 'a',
dot: false,
redraw: true
},
write_number: {
deviceId: 0,
value: 1,
base: 10,
decimalPlaces: 0,
zeroPad: false,
leftJustify: false
},
write_text: {
deviceId: 0,
text: 'a'
},
show_message: {
text: 'a',
delay: 0.4
}
];
const matrixMethod = [
letter: {
deviceId: 0,
asciiCode: 0,
font: null,
redraw: true
},
scroll_up: {
redrawn: true
},
scroll_down: {
redrawn: true
},
show_message: {
text: 'a',
font: null,
delay: 0.05,
always_scroll: false
},
pixel: {
x: 0,
y: 0,
value: 0,
redraw: true
},
invert: {
value: 0,
redrawn: true
},
orientation: {
angle: 0, //[0, 90, 180, 270]
redrawn: true
}
];