Fix for MAXH2O-96.
This commit is contained in:
@@ -6,6 +6,6 @@
|
|||||||
},
|
},
|
||||||
"deviceName": "flowmonitor",
|
"deviceName": "flowmonitor",
|
||||||
"driverId": "0140",
|
"driverId": "0140",
|
||||||
"releaseVersion": "9",
|
"releaseVersion": "10",
|
||||||
"driverFileName": "flow-monitor.py"
|
"driverFileName": "flow-monitor.py"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ class start(threading.Thread, deviceBase):
|
|||||||
self.GPM_IGNORE_LIMIT = 1.0
|
self.GPM_IGNORE_LIMIT = 1.0
|
||||||
|
|
||||||
self.daemon = True
|
self.daemon = True
|
||||||
self.version = "8"
|
self.version = "10"
|
||||||
self.finished = threading.Event()
|
self.finished = threading.Event()
|
||||||
threading.Thread.start(self)
|
threading.Thread.start(self)
|
||||||
|
|
||||||
@@ -235,8 +235,9 @@ class start(threading.Thread, deviceBase):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
self.GPM_IGNORE_LIMIT = PERSIST['gpm_ignore_limit']
|
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))
|
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.
|
# on bootup, if the day has changed, clear the totalizers.
|
||||||
# this would happen if the device is off when the time changes to Midnight.
|
# 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
|
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)
|
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
|
gpm_val = 0
|
||||||
|
|
||||||
bpd_val = (gpm_val / gal_per_bbl) * 60.0 * 24.0 # Computes BPD from GPM
|
bpd_val = (gpm_val / gal_per_bbl) * 60.0 * 24.0 # Computes BPD from GPM
|
||||||
|
|||||||
Reference in New Issue
Block a user