]> git.gag.com Git - fw/quantimotor/commitdiff
display pressure in psi
authorBdale Garbee <bdale@gag.com>
Sun, 25 May 2025 19:00:13 +0000 (13:00 -0600)
committerBdale Garbee <bdale@gag.com>
Sun, 25 May 2025 19:00:13 +0000 (13:00 -0600)
ui/app.py

index efc7593d697dc80c1688075bc2c0c9d875bf594c..78ddfead825dd1f65f268e4af9ca625d64fa6c66 100755 (executable)
--- a/ui/app.py
+++ b/ui/app.py
@@ -108,7 +108,7 @@ class App:
       voltage = (float(rawstring) + float(OFFSET)) * float(SCALE) / 1000
       match chan.id:
         case 'voltage0':
-          pressure = '%.3f'%(voltage)
+          pressure = '%.3f'%(((voltage-0.5)/4.0)*1600)
         case 'voltage1':
           thrust = '%.3f'%(voltage)
         case 'voltage2':