Manages the 1-wire bus
Dependents: oldheating heating
Diff: web/web-1wire-html.c
- Revision:
- 3:3204c80a9894
- Parent:
- 2:79cad6a51fd0
- Child:
- 4:822208cb5a13
diff -r 79cad6a51fd0 -r 3204c80a9894 web/web-1wire-html.c --- a/web/web-1wire-html.c Sat Apr 27 09:26:15 2019 +0000 +++ b/web/web-1wire-html.c Mon Apr 29 14:46:28 2019 +0000 @@ -1,34 +1,33 @@ #include <stdio.h> #include "http.h" -#include "web-base.h" -#include "page.h" -#include "page-derived.h" +#include "web-page-derived.h" +#include "web-add.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"); + WebAddHeader("1-Wire", "settings.css", "1wire.js"); + WebAddNav(ONE_WIRE_PAGE); + WebAddH1("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"); + WebAddH2("1-wire bus timings"); + WebAddAjaxLabelled ("Scan time ms", "ajax-1-wire-scan-time" ); + WebAddAjaxLabelled ("Low start tweak", "ajax-1-wire-tweak-low" ); + WebAddAjaxLabelled ("Float start tweak", "ajax-1-wire-tweak-float" ); + WebAddAjaxLabelled ("Read start tweak", "ajax-1-wire-tweak-read" ); + WebAddAjaxLabelled ("High start tweak", "ajax-1-wire-tweak-high" ); + WebAddAjaxLabelled ("Release start tweak", "ajax-1-wire-tweak-release"); + WebAddAjaxInputToggle("One wire trace", "ajax-1-wire-trace" , "onewiretrace"); - PageAddH2("DS18B20 1-wire devices"); + WebAddH2("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"); + WebAddH2("ROMs"); + WebAddAjaxInputLabelId("ajax-name-0", 11, "ajax-rom-0", "rom0"); + WebAddAjaxInputLabelId("ajax-name-1", 11, "ajax-rom-1", "rom1"); + WebAddAjaxInputLabelId("ajax-name-2", 11, "ajax-rom-2", "rom2"); + WebAddAjaxInputLabelId("ajax-name-3", 11, "ajax-rom-3", "rom3"); - PageAddEnd(); + WebAddEnd(); }