Remove load limiting indicators
authorJoseph Coffland <joseph@cauldrondevelopment.com>
Fri, 16 Feb 2018 05:49:02 +0000 (21:49 -0800)
committerJoseph Coffland <joseph@cauldrondevelopment.com>
Fri, 16 Feb 2018 05:49:02 +0000 (21:49 -0800)
src/jade/templates/indicators.jade
src/py/bbctrl/Pwr.py

index e2182dce308614810ef43805e07cea0238d9da89..b9a330af2d37bef0450e0010e0665fdd9f274423 100644 (file)
@@ -134,12 +134,6 @@ script#indicators-template(type="text/x-template")
         th.separator
         th Load 2 over temp
         td {{state['load2_overtemp'] ? 'True' : 'False'}}
-      tr
-        th Load 1 limiting
-        td {{state['load1_limiting'] ? 'True' : 'False'}}
-        th.separator
-        th Load 2 limiting
-        td {{state['load2_limiting'] ? 'True' : 'False'}}
 
     table.measurements
       tr
index aa3e7b9d6fbf7f65e371a2e7fde8e3de73a04766..96bf60a8a56a1bdb06e6401003968de44f942d30 100644 (file)
@@ -51,8 +51,6 @@ SHUNT_OVERLOAD_FLAG    = 1 << 4
 MOTOR_OVERLOAD_FLAG    = 1 << 5
 LOAD1_OVERTEMP_FLAG    = 1 << 6
 LOAD2_OVERTEMP_FLAG    = 1 << 7
-LOAD1_LIMITING_FLAG    = 1 << 8
-LOAD2_LIMITING_FLAG    = 1 << 9
 
 reg_names = 'temp vin vout motor load1 load2 vdd pwr_flags'.split()
 
@@ -81,7 +79,7 @@ class Pwr():
         return False
 
 
-    def error(self):
+    def check_faults(self):
         flags = self.regs[FLAGS_REG]
 
         if self.check_fault('under_voltage', flags & UNDER_VOLTAGE_FLAG):
@@ -109,12 +107,6 @@ class Pwr():
         if self.check_fault('load2_overtemp', flags & LOAD2_OVERTEMP_FLAG):
             log.error('Load 2 over temperature shutdown')
 
-        if self.check_fault('load1_limiting', flags & LOAD1_LIMITING_FLAG):
-            log.warning('Load 1 limiting active')
-
-        if self.check_fault('load2_limiting', flags & LOAD2_LIMITING_FLAG):
-            log.warning('Load 2 limiting active')
-
 
     def _update(self):
         update = {}
@@ -134,7 +126,7 @@ class Pwr():
                     update[key] = value
                     self.regs[i] = value
 
-                    if i == FLAGS_REG and value: self.error()
+                if i == FLAGS_REG: self.check_faults()
 
         except Exception as e:
             log.warning('Pwr communication failed: %s' % e)