]> mj.ucw.cz Git - home-hw.git/commitdiff
Iris: Cleanup
authorMartin Mares <mj@ucw.cz>
Fri, 29 Dec 2023 19:44:31 +0000 (20:44 +0100)
committerMartin Mares <mj@ucw.cz>
Fri, 29 Dec 2023 19:45:23 +0000 (20:45 +0100)
rainbow/iris/burrow-iris.py

index 24865a899bb0ec0214dbdcdda910160d521fa1d5..edd7d26788c0d493a6743e7c19f583b874008a44 100755 (executable)
@@ -76,20 +76,20 @@ led_event = None
 def boiler_led():
     stat = st.get_status('bsb', 'ok')
     if stat != 'ok':
-        return (1, 1, 0)
+        return (1, 0.1, 0.1)    # pastel red
 
     err = st.get_sensor('heating/error', 0, timeout=None)
     if err > 0:
-        return (1, 0, 0)
+        return (1, 0, 0)        # red
 
     if st.get_sensor('heating/circuit1/pump', 0, timeout=3600) > 0:
-        return (0.2, 0, 0.2)
+        return (0.2, 0, 0.2)    # magenta
 
     if st.get_sensor('heating/circuit2/active', 0, timeout=3600) > 0:
-        return (0, 0.3, 0)
+        return (0.2, 0.2, 0)    # yellow
 
     if st.get_sensor('heating/water/active', 0, timeout=3600) > 0:
-        return (0, 0, 0.3)
+        return (0, 0.2, 0.2)    # cyan
 
     return None
 
@@ -97,16 +97,16 @@ def boiler_led():
 def catarium_led():
     temp = st.get_sensor('temp/catarium')
     if temp is None:
-        return (1, 0, 0)
+        return (1, 0, 0)        # red
 
     if temp < 22:
-        return (0, 0, 1)
+        return (0, 0, 1)        # blue
 
     if temp < 23:
-        return (0, 0.5, 0.5)
+        return (0.3, 0.3, 0.7)  # pastel blue
 
     if temp > 26:
-        return (0.1, 0.1, 0)
+        return (0.7, 0.7, 0.1)  # pastel yellow
 
     return None