thrimshim odo hack: assume unmatched time of day means dawn

until we can fix dawn detection.
pull/488/head
Mike Lang 2 weeks ago
parent bf9da27ca4
commit 2aadf79bfb

@ -835,7 +835,6 @@ def get_odometer(channel):
SELECT timestamp, clock, timeofday SELECT timestamp, clock, timeofday
FROM bus_data FROM bus_data
WHERE clock IS NOT NULL WHERE clock IS NOT NULL
AND timeofday IS NOT NULL
AND channel = %(channel)s AND channel = %(channel)s
AND timestamp > %(start)s AND timestamp > %(start)s
AND timestamp <= %(end)s AND timestamp <= %(end)s
@ -849,7 +848,8 @@ def get_odometer(channel):
clock_face = None clock_face = None
else: else:
clock12h = result.clock clock12h = result.clock
timeofday = result.timeofday # HACK: assume null means dawn, as we can reliably detect everything else.
timeofday = result.timeofday or "dawn"
clock24h = clock12h clock24h = clock12h
if time_is_pm(conn, result.timestamp, clock12h, timeofday): if time_is_pm(conn, result.timestamp, clock12h, timeofday):

Loading…
Cancel
Save