Manages the 1-wire bus
Dependents: oldheating heating
web/web-1wire-html.c@2:79cad6a51fd0, 2019-04-27 (annotated)
- Committer:
- andrewboyson
- Date:
- Sat Apr 27 09:26:15 2019 +0000
- Revision:
- 2:79cad6a51fd0
- Child:
- 3:3204c80a9894
Updated web library
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
andrewboyson | 2:79cad6a51fd0 | 1 | #include <stdio.h> |
andrewboyson | 2:79cad6a51fd0 | 2 | |
andrewboyson | 2:79cad6a51fd0 | 3 | #include "http.h" |
andrewboyson | 2:79cad6a51fd0 | 4 | #include "web-base.h" |
andrewboyson | 2:79cad6a51fd0 | 5 | #include "page.h" |
andrewboyson | 2:79cad6a51fd0 | 6 | #include "page-derived.h" |
andrewboyson | 2:79cad6a51fd0 | 7 | |
andrewboyson | 2:79cad6a51fd0 | 8 | void WebOneWireHtml() |
andrewboyson | 2:79cad6a51fd0 | 9 | { |
andrewboyson | 2:79cad6a51fd0 | 10 | HttpOk("text/html; charset=UTF-8", "no-cache", NULL, NULL); |
andrewboyson | 2:79cad6a51fd0 | 11 | PageAddHeader(PageSite, "1-Wire", "settings.css", "1wire.js"); |
andrewboyson | 2:79cad6a51fd0 | 12 | PageAddNav(ONE_WIRE_PAGE); |
andrewboyson | 2:79cad6a51fd0 | 13 | PageAddH1(PageSite, "1-Wire"); |
andrewboyson | 2:79cad6a51fd0 | 14 | |
andrewboyson | 2:79cad6a51fd0 | 15 | PageAddH2("1-wire bus timings"); |
andrewboyson | 2:79cad6a51fd0 | 16 | PageAddAjaxLabelled ("Scan time ms", "ajax-1-wire-scan-time" ); |
andrewboyson | 2:79cad6a51fd0 | 17 | PageAddAjaxLabelled ("Low start tweak", "ajax-1-wire-tweak-low" ); |
andrewboyson | 2:79cad6a51fd0 | 18 | PageAddAjaxLabelled ("Float start tweak", "ajax-1-wire-tweak-float" ); |
andrewboyson | 2:79cad6a51fd0 | 19 | PageAddAjaxLabelled ("Read start tweak", "ajax-1-wire-tweak-read" ); |
andrewboyson | 2:79cad6a51fd0 | 20 | PageAddAjaxLabelled ("High start tweak", "ajax-1-wire-tweak-high" ); |
andrewboyson | 2:79cad6a51fd0 | 21 | PageAddAjaxLabelled ("Release start tweak", "ajax-1-wire-tweak-release"); |
andrewboyson | 2:79cad6a51fd0 | 22 | PageAddAjaxInputToggle("One wire trace", "ajax-1-wire-trace" , "onewiretrace"); |
andrewboyson | 2:79cad6a51fd0 | 23 | |
andrewboyson | 2:79cad6a51fd0 | 24 | PageAddH2("DS18B20 1-wire devices"); |
andrewboyson | 2:79cad6a51fd0 | 25 | HttpAddText("<code id='ajax-device-values'></code>\r\n"); |
andrewboyson | 2:79cad6a51fd0 | 26 | |
andrewboyson | 2:79cad6a51fd0 | 27 | PageAddH2("ROMs"); |
andrewboyson | 2:79cad6a51fd0 | 28 | PageAddAjaxInputLabelId("ajax-name-0", 11, "ajax-rom-0", "rom0"); |
andrewboyson | 2:79cad6a51fd0 | 29 | PageAddAjaxInputLabelId("ajax-name-1", 11, "ajax-rom-1", "rom1"); |
andrewboyson | 2:79cad6a51fd0 | 30 | PageAddAjaxInputLabelId("ajax-name-2", 11, "ajax-rom-2", "rom2"); |
andrewboyson | 2:79cad6a51fd0 | 31 | PageAddAjaxInputLabelId("ajax-name-3", 11, "ajax-rom-3", "rom3"); |
andrewboyson | 2:79cad6a51fd0 | 32 | |
andrewboyson | 2:79cad6a51fd0 | 33 | PageAddEnd(); |
andrewboyson | 2:79cad6a51fd0 | 34 | } |