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
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",