-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsettings-sample.py
More file actions
32 lines (29 loc) · 2.47 KB
/
settings-sample.py
File metadata and controls
32 lines (29 loc) · 2.47 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
# Running mode. If true, it outputs to GPIO
piMode = False
# Paths for log and persistent storage for slave-displayed time. Make sure the files (if present, otherwise the containing directory) are writable by the user that will be running the daemon.
logPath = '/var/log/master-clock/master-clock.log'
logDebug = False
# Note, you can monitor the log in real time with tail -f [logPath]
slavePath = '/var/log/master-clock/master-clock-slavetime.txt'
slaveWriteRealTime = True
# True writes after every impulse (except during fast forward), but this may affect the life of storage media; False writes only when the app closes, but this means it'll need calibration after any power loss
# Slave clock control
slaveBipolar = True #if False, define slavePin; if True, define slavePinEven and slavePinOdd)
#Broadcom pin ID(s)
slavePin = False
slavePinEven = 23
slavePinOdd = 24
slaveInterval = 30 #seconds between impulses (normal operation, includes impulse duration)
slaveImpulse = 0.3 #seconds impulse duration
slaveRecover = 0.4 #seconds between impulses (fast forwarding, excludes impulse duration)
slaveHrs = 12 #Is it a 12-hour or 24-hour display?
slaveHold = 2 #If the slave is no more than X hours ahead (disregarding date), wait for real time to catch up, instead of advancing all the way around. If your slave displays the day/date (e.g. Solari Emera/Dator), you may prefer to set this to 0, as the slave is unlikely to get ahead of real time (without being set forward manually).
# Seconds/status meter control
meterPin = 18 #Broadcom pin ID that supports PWM - set to False if you have no meter
# Meter calibration points, display value vs PWM duty cycle value. Use calibrate-meter.py to find points for your meter. This also defines the range of your meter scale. (If it starts at zero, you can omit (0,0); it will be assumed.)
meterCal = [(59,94)] #This default defines a 60-second scale, more or less, on a 3VDC meter (since Pi GPIO is 3.3V).
# Meter ballistics: when making a relatively large change to the meter display, quadratic easing is applied to prevent the needle from moving too violently (pegging, wobbling)
meterSec = 1 #ticking duration: one tick per x sec. For small meters, a slower (higher) value may prove easier to read. (Ticking pattern will reset at the top of the minute, so best to pick something that 60 is divisible by.)
meterChg = 10 #min change in pwm duty cycle that will trigger ballistics
meterStp = 4 #apply ballistics in this many steps
meterLag = 0.18 #seconds between ballistics steps