Monitor motorhome leisure battery and provide simple control of habitation
Dependencies: net lpc1768 crypto clock web fram log
web-this/battery/web-battery-html.c@10:a97a7cb7aa82, 2022-06-10 (annotated)
- Committer:
- andrewboyson
- Date:
- Fri Jun 10 18:32:21 2022 +0000
- Revision:
- 10:a97a7cb7aa82
- Parent:
- 9:d957af50fdc2
Corrected amp second count in html
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
andrewboyson | 0:b843d647695c | 1 | #include "http.h" |
andrewboyson | 0:b843d647695c | 2 | #include "web-nav-this.h" |
andrewboyson | 0:b843d647695c | 3 | #include "web-add.h" |
andrewboyson | 0:b843d647695c | 4 | |
andrewboyson | 9:d957af50fdc2 | 5 | void WebBatteryHtml() |
andrewboyson | 0:b843d647695c | 6 | { |
andrewboyson | 0:b843d647695c | 7 | HttpOk("text/html; charset=UTF-8", "no-cache", NULL, NULL); |
andrewboyson | 9:d957af50fdc2 | 8 | WebAddHeader("Battery", "settings.css", "battery.js"); |
andrewboyson | 9:d957af50fdc2 | 9 | WebAddNav(BATTERY_PAGE); |
andrewboyson | 9:d957af50fdc2 | 10 | WebAddH1("Battery"); |
andrewboyson | 0:b843d647695c | 11 | |
andrewboyson | 9:d957af50fdc2 | 12 | WebAddH2("Counted capacity"); |
andrewboyson | 9:d957af50fdc2 | 13 | WebAddAjaxLabelled ("Battery capacity Ah" , "txt-battery-counted-capacity-amp-hours" ); |
andrewboyson | 9:d957af50fdc2 | 14 | WebAddAjaxInput ("Battery capacity %" , 2, "val-battery-counted-capacity-percent", "set-battery-counted-capacity-percent" ); |
andrewboyson | 9:d957af50fdc2 | 15 | WebAddAjaxInput ("Battery error %" , 2, "val-battery-counted-error" , "set-battery-counted-error" ); |
andrewboyson | 9:d957af50fdc2 | 16 | WebAddAjaxLabelled ("Battery current mA" , "txt-battery-current-ma" ); |
andrewboyson | 0:b843d647695c | 17 | |
andrewboyson | 9:d957af50fdc2 | 18 | WebAddH2("Measured capacity"); |
andrewboyson | 9:d957af50fdc2 | 19 | WebAddAjaxLabelled ("Battery voltage mV" , "txt-battery-voltage-mv" ); |
andrewboyson | 9:d957af50fdc2 | 20 | WebAddAjaxLabelled ("Battery measured capacity" , "txt-battery-measured-percent" ); |
andrewboyson | 9:d957af50fdc2 | 21 | WebAddAjaxLabelled ("Battery measured error" , "txt-battery-measured-error" ); |
andrewboyson | 9:d957af50fdc2 | 22 | WebAddAjaxInputToggle("Battery capacity auto update" , "att-battery-auto-update" , "chg-battery-auto-update" ); |
andrewboyson | 9:d957af50fdc2 | 23 | |
andrewboyson | 9:d957af50fdc2 | 24 | WebAddH2("Temperature"); |
andrewboyson | 9:d957af50fdc2 | 25 | WebAddAjaxLabelled ("Battery temperature °C" , "txt-battery-temperature-tenths" ); |
andrewboyson | 9:d957af50fdc2 | 26 | WebAddAjaxInput ("Battery heater setpoint °C", 3, "val-battery-temperature-setpoint" , "set-battery-temperature-setpoint" ); |
andrewboyson | 9:d957af50fdc2 | 27 | WebAddAjaxLabelled ("Battery heater output %" , "txt-battery-heater-output-percent" ); |
andrewboyson | 0:b843d647695c | 28 | |
andrewboyson | 9:d957af50fdc2 | 29 | WebAddH2("Mode"); |
andrewboyson | 9:d957af50fdc2 | 30 | WebAddAjaxInput ("Battery capacity setpoint (%)" , 2, "val-battery-capacity-setpoint-percent", "set-battery-capacity-setpoint-percent" ); |
andrewboyson | 9:d957af50fdc2 | 31 | WebAddAjaxLabelled ("Battery mode" , "txt-battery-output-state" ); |
andrewboyson | 9:d957af50fdc2 | 32 | WebAddAjaxInputToggle("Battery charge enable" , "att-battery-charge-enabled" , "chg-battery-charge-enabled" ); |
andrewboyson | 9:d957af50fdc2 | 33 | WebAddAjaxInputToggle("Battery discharge enable" , "att-battery-discharge-enabled" , "chg-battery-discharge-enabled" ); |
andrewboyson | 0:b843d647695c | 34 | |
andrewboyson | 0:b843d647695c | 35 | WebAddEnd(); |
andrewboyson | 0:b843d647695c | 36 | |
andrewboyson | 0:b843d647695c | 37 | } |