]> git.gag.com Git - fw/quantimotor/commitdiff
added pyro and battery values to ajax call
authorBdale Garbee <bdale@gag.com>
Wed, 7 May 2025 20:36:04 +0000 (14:36 -0600)
committerBdale Garbee <bdale@gag.com>
Wed, 7 May 2025 20:36:04 +0000 (14:36 -0600)
application/app.py
application/index.html

index 3fc23eb7de4295d1ca5ffe58e12cc83b1fc7fab1..3676fb29a137a96fe344c839bbcc62dae9978719 100755 (executable)
@@ -73,9 +73,13 @@ class App:
     b = ' N'
     p = str(n) + a
     t = str(n) + b
+    pyro_v = str(n) + ' volts'
+    batt_v = str(n) + ' volts'
     return {
       'pressure' : p,
-      'thrust' : t
+      'thrust' : t,
+      'pyro' : pyro_v,
+      'battery' : batt_v
     }
 
 
index 31bb46f9df6de5b9acb2524ad3f62a85e1cf6ed4..3baaa97f08882518beda30d99a647c47a01171fd 100644 (file)
@@ -2,7 +2,7 @@
 <html>
 <head>
 <meta http-equiv='content-type' content='text/html; charset=utf-8'>
-<title>CCMF</title>
+<title>QuantiMotor</title>
 <script type='text/javascript' src='/jquery-3.7.1.js'></script>
 <script type='text/javascript'>
   $(document).ready(function()
@@ -14,6 +14,8 @@
       {
         $('#pressure').text(response.pressure);
         $('#thrust').text(response.thrust);
+        $('#pyro').text(response.pyro);
+        $('#battery').text(response.battery);
       });
       request.fail(function(jqXHR, textStatus) 
       {
 </script>
 </head>
 <body>
+  <h1>QuantiMotor</h1>
   <button>make ajax call</button>
-  <h1>Pressure</h1>
+  <h2>Pressure</h2>
   <div id='pressure'></div>
-  <h1>Thrust</h1>
+  <h2>Thrust</h2>
   <div id='thrust'></div>
+  <h2>Pyro</h2>
+  <div id='pyro'></div>
+  <h2>Battery</h2>
+  <div id='battery'></div>
 </body>
 </html>