Manages the 1-wire bus
Dependents: oldheating heating
Diff: web/web-1wire-html.c
- Revision:
- 2:79cad6a51fd0
- Child:
- 3:3204c80a9894
diff -r c272b1fcc834 -r 79cad6a51fd0 web/web-1wire-html.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/web-1wire-html.c Sat Apr 27 09:26:15 2019 +0000 @@ -0,0 +1,34 @@ +#include <stdio.h> + +#include "http.h" +#include "web-base.h" +#include "page.h" +#include "page-derived.h" + +void WebOneWireHtml() +{ + HttpOk("text/html; charset=UTF-8", "no-cache", NULL, NULL); + PageAddHeader(PageSite, "1-Wire", "settings.css", "1wire.js"); + PageAddNav(ONE_WIRE_PAGE); + PageAddH1(PageSite, "1-Wire"); + + PageAddH2("1-wire bus timings"); + PageAddAjaxLabelled ("Scan time ms", "ajax-1-wire-scan-time" ); + PageAddAjaxLabelled ("Low start tweak", "ajax-1-wire-tweak-low" ); + PageAddAjaxLabelled ("Float start tweak", "ajax-1-wire-tweak-float" ); + PageAddAjaxLabelled ("Read start tweak", "ajax-1-wire-tweak-read" ); + PageAddAjaxLabelled ("High start tweak", "ajax-1-wire-tweak-high" ); + PageAddAjaxLabelled ("Release start tweak", "ajax-1-wire-tweak-release"); + PageAddAjaxInputToggle("One wire trace", "ajax-1-wire-trace" , "onewiretrace"); + + PageAddH2("DS18B20 1-wire devices"); + HttpAddText("<code id='ajax-device-values'></code>\r\n"); + + PageAddH2("ROMs"); + PageAddAjaxInputLabelId("ajax-name-0", 11, "ajax-rom-0", "rom0"); + PageAddAjaxInputLabelId("ajax-name-1", 11, "ajax-rom-1", "rom1"); + PageAddAjaxInputLabelId("ajax-name-2", 11, "ajax-rom-2", "rom2"); + PageAddAjaxInputLabelId("ajax-name-3", 11, "ajax-rom-3", "rom3"); + + PageAddEnd(); +}