forked from rtitmuss/splitflap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfig.py
More file actions
50 lines (44 loc) · 1.92 KB
/
Copy pathConfig.py
File metadata and controls
50 lines (44 loc) · 1.92 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
from provider.ProviderArt import ProviderArt
from provider.ProviderClock import ProviderClock
from provider.ProviderDadJoke import ProviderDadJoke
from provider.ProviderMotion import ProviderMotion
from provider.ProviderNewYearCountdown import ProviderNewYearCountdown
from provider.ProviderLetters import ProviderLetters
from provider.ProviderWordClock import ProviderWordClock
# default timezone for the application
default_timezone = "Europe/Stockholm"
# element order when displaying alphabet
display_order = ['abcd', 'efgh']
# flap offsets in display order for calibration
display_offsets = [-39, -5, -31, -2, -43, -19, -20, 92]
providers = {
"{CLOCK_STO}": ProviderClock("STO %H:%M %d.%m.%Y", "Europe/Stockholm"),
"{CLOCK_ADL}": ProviderClock("ADL %H:%M %d.%m.%Y", "Australia/Adelaide"),
"{CLOCK_NYC}": ProviderClock("NYC %H:%M %d.%m.%Y", "America/New_York"),
"{WORD_CLOCK_STO_EN}": ProviderWordClock("en", "Europe/Stockholm"),
"{WORD_CLOCK_STO_SV}": ProviderWordClock("sv", "Europe/Stockholm"),
"{NEW_YEAR_STO}": ProviderNewYearCountdown("Europe/Stockholm"),
"{ART}": ProviderArt(),
"{MOTION}": ProviderMotion(),
"{DAD_JOKE}": ProviderDadJoke(),
"{LETTERS}": ProviderLetters(),
}
_alphabet = 'abcdefghijklmnopqrstuvwxyz'
_display_len = len(display_order)
test_words = [
# display length words
_alphabet[:_display_len],
_alphabet[3:3 + _display_len],
_alphabet[6:6 + _display_len],
"A" * _display_len,
"B" * _display_len,
"Y" * _display_len,
"Z" * _display_len,
"$" * _display_len,
"&" * _display_len,
"$#" * int(_display_len / 2) + "#$" * int(_display_len / 2),
# short words
"Hello", "World", "Spirit", "Purple", "Marvel", "Garden", "Elephant", "Football", "Birthday", "Rainbow",
"Keyboard", "Necklace", "Positive", "Mountain", "Campaign", "Hospital", "Orbit", "Pepper",
"7849501273", "2398756104", "5476928310", "1062547983", "3987165420",
]