1 Commits
v1.0 ... v1.0.1

Author SHA1 Message Date
Patrick McDonagh
f48c165aff Fix for MAXH2O-96. 2018-01-10 11:52:08 -06:00
2 changed files with 5 additions and 4 deletions

View File

@@ -6,6 +6,6 @@
},
"deviceName": "flowmonitor",
"driverId": "0140",
"releaseVersion": "9",
"releaseVersion": "10",
"driverFileName": "flow-monitor.py"
}

View File

@@ -133,7 +133,7 @@ class start(threading.Thread, deviceBase):
self.GPM_IGNORE_LIMIT = 1.0
self.daemon = True
self.version = "8"
self.version = "10"
self.finished = threading.Event()
threading.Thread.start(self)
@@ -235,8 +235,9 @@ class start(threading.Thread, deviceBase):
try:
self.GPM_IGNORE_LIMIT = PERSIST['gpm_ignore_limit']
except KeyError:
except Exception:
print("no persisted GPM Ignore Limit. Using default of {}".format(self.GPM_IGNORE_LIMIT))
self.flowmonitor_setgpmignorelimit("gpm_ignore_limit", self.GPM_IGNORE_LIMIT)
# on bootup, if the day has changed, clear the totalizers.
# this would happen if the device is off when the time changes to Midnight.
@@ -253,7 +254,7 @@ class start(threading.Thread, deviceBase):
din1_val = 1 if mcu_status['din1'] == 'On' else 0 # Check DIGITAL INPUT 1 for run status
gpm_val = scale(cloop_val, self.RAW_MIN, self.RAW_MAX, self.GPM_MIN, self.GPM_MAX)
if gpm_val < GPM_IGNORE_LIMIT:
if gpm_val < self.GPM_IGNORE_LIMIT:
gpm_val = 0
bpd_val = (gpm_val / gal_per_bbl) * 60.0 * 24.0 # Computes BPD from GPM