Monitor motorhome leisure battery and provide simple control of habitation

Dependencies:   net lpc1768 crypto clock web fram log

Files at this revision

API Documentation at this revision

Comitter:
andrewboyson
Date:
Fri Jun 10 18:32:21 2022 +0000
Parent:
9:d957af50fdc2
Commit message:
Corrected amp second count in html

Changed in this revision

web-this/battery/web-battery-query.c Show annotated file Show diff for this revision Revisions of this file
diff -r d957af50fdc2 -r a97a7cb7aa82 web-this/battery/web-battery-query.c
--- a/web-this/battery/web-battery-query.c	Mon Jun 06 11:08:53 2022 +0000
+++ b/web-this/battery/web-battery-query.c	Fri Jun 10 18:32:21 2022 +0000
@@ -17,6 +17,18 @@
             BatterySetCountedCapacity(value);
             return;
         }
+        if (HttpSameStr(pName, "set-battery-counted-capacity-amp-hours"))
+        {
+            int value = HttpQueryValueAsInt(pValue);
+            BatterySetCountedCapacity(value * 3600);
+            return;
+        }
+        if (HttpSameStr(pName, "set-battery-counted-capacity-percent"))
+        {
+            int value = HttpQueryValueAsInt(pValue);
+            BatterySetCountedCapacity(value * 36 * 280);
+            return;
+        }
         if (HttpSameStr(pName, "set-battery-counted-error"))
         {
             int value = HttpQueryValueAsInt(pValue);