diff --git a/src/python/config.py b/src/python/config.py index c9e3887..0c33f94 100644 --- a/src/python/config.py +++ b/src/python/config.py @@ -114,7 +114,7 @@ def __init__(self): self.NIGHT_MODE_TIMEOUT = 15 self.NIGHT_MODE_START_HOUR = 0 # Starting hour when night mode begins (inclusive) self.NIGHT_MODE_START_MINUTE = 30 # Starting minute when night mode begins (inclusive) - self.NIGHT_MODE_END_HOUR = 7 # Ending hour when night mode stops (exclusive) + self.NIGHT_MODE_END_HOUR = 23 # Ending hour when night mode stops (exclusive) self.NIGHT_MODE_END_MINUTE = 30 # Ending minute when night mode stops (exclusive) self.CYCLE_SPEED = 0.15 @@ -213,4 +213,4 @@ def update(self): # Tell Display that things are dirty for next update self.DIRTY = True -Config = Configuration() \ No newline at end of file +Config = Configuration() diff --git a/src/python/midi_pi.py b/src/python/midi_pi.py index 9dc33eb..8a38745 100755 --- a/src/python/midi_pi.py +++ b/src/python/midi_pi.py @@ -35,7 +35,7 @@ def update(self): Config.update() Leds.updateLeds() Music.update() - Cal.update() + # Cal.update() self.Display.update() updatePendingActions(self.Display) @@ -71,4 +71,4 @@ def profile(self): finally: MidiPorts.cleanup() Server.running = False - print('Exit') \ No newline at end of file + print('Exit') diff --git a/src/python/server.py b/src/python/server.py index b2bae22..1b81af1 100644 --- a/src/python/server.py +++ b/src/python/server.py @@ -35,7 +35,7 @@ def __init__(self, path, handler, contentType="application/json"): '/status': GetRequest('/status', lambda req: status(req)), '/stop': GetRequest('/stop', lambda req: stop(req)), '/volume': GetRequest('/volume', lambda req: volume(req)), - '*': GetRequest('/', lambda req: other(req), 'application/html') + '*': GetRequest('/', lambda req: other(req), 'text/html') } def brightness(req): @@ -121,12 +121,14 @@ def power(req): query = parse_qs(req.query) if 'value' in query: - on = bool(query['value'][0]) + value = query['value'][0] - if on: + if value == "true" or value == "on": Power.on() + print("on") return status(req, "Turning on power") else: + print("off") Power.off() return status(req, "Turning off power")