From: Bdale Garbee Date: Fri, 30 May 2025 00:52:47 +0000 (-0600) Subject: fixed continuity sense to work with armed switch in either position X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=5cbfcdc60ab48133c2501854f6710f9b5bb4bfff;p=fw%2Fquantimotor fixed continuity sense to work with armed switch in either position --- diff --git a/ui/app.py b/ui/app.py index 447424d..1d7abc9 100755 --- a/ui/app.py +++ b/ui/app.py @@ -295,6 +295,8 @@ class App: t = time.localtime() current_time = time.strftime("%Y:%m:%d %H:%M:%S", t) + armed = sense_armed() + for id in VOLTAGES: chan = ctrl.find_channel(id) rawstring = chan.attrs['raw'].value @@ -305,15 +307,21 @@ class App: case 'voltage1': thrust = '%.3f'%(voltage) case 'voltage2': - if voltage > (15/16 * float(battery)): + raw_pyro = voltage + # when the box is safed, there's an extra 200k resistor in the stack + if armed == "safe": + pyrovolts = float(voltage) / (22/570) + else: + pyrovolts = float(voltage) / (22/221) + # divider ratios were somewhat empirical, use this logging call if need to review + # cherrypy.log(" battery " + str(battery) + " pyrovolts " + str(pyrovolts)) + if pyrovolts > (15/16 * float(battery)): pyro = "good" else: pyro = "open" case 'voltage3': battery = '%.1f'%(voltage / (22/222)) - armed = sense_armed() - return { 'time' : current_time, 'pressure' : pressure + " psi",