-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.py
43 lines (31 loc) · 1.14 KB
/
config.py
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
from stations import haslemere as station
STATION = station.CODE
DIRECTIONS = station.DIRECTIONS
STATION_CODES = station.STATION_CODES
# This many minutes or longer counts as a severe delay
SEVERE_DELAY_THRESHOLD = 5
SERIAL_PORT = '/dev/ttyACM0'
import display
# Arduino
# DISPLAY = display.SerialDisplay
# Raspberry pi, using Adafruit char LCD lib
DISPLAY = display.RgbGpioDisplay
# Gpio pins used for backlight control
# (We don't actually use blue so haven't wired it up to anything)
BACKLIGHT_GREEN = 4
BACKLIGHT_BLUE = 0
BACKLIGHT_RED = 18
# LED type used for backlight
# common anode (e.g. the Adafruit ones) - set low to switch on (0, 1)
# common cathode LEDs (many others) - set high to switch on (1, 0)
BACKLIGHT_ON, BACKLIGHT_OFF = (0, 1)
# Enable this if testing without external device -
# output to console
#DISPLAY = display.DebugDisplay
import formats
FORMATTER = formats.SixteenByTwo
# Range of hours in which we should not bother fetching times
# it saves on pointless requests and also prevents this thing
# lighting up at 4am when the first trains go onto the board!.
# e.g. range(1,5) means between 1am and 4:49am
QUIET_HOURS = range(1,6)