Manages the 1-wire bus

Dependents:   oldheating heating

Committer:
andrewboyson
Date:
Wed Jun 10 17:02:21 2020 +0000
Revision:
10:b4e0b4c4e045
Parent:
5:fe9b7444ba69
Modified the web module to allow up to 8 devices rather than 4.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
andrewboyson 2:79cad6a51fd0 1 #include <stdio.h>
andrewboyson 2:79cad6a51fd0 2
andrewboyson 2:79cad6a51fd0 3 #include "http.h"
andrewboyson 5:fe9b7444ba69 4 #include "web-nav-this.h"
andrewboyson 3:3204c80a9894 5 #include "web-add.h"
andrewboyson 2:79cad6a51fd0 6
andrewboyson 2:79cad6a51fd0 7 void WebOneWireHtml()
andrewboyson 2:79cad6a51fd0 8 {
andrewboyson 2:79cad6a51fd0 9 HttpOk("text/html; charset=UTF-8", "no-cache", NULL, NULL);
andrewboyson 3:3204c80a9894 10 WebAddHeader("1-Wire", "settings.css", "1wire.js");
andrewboyson 3:3204c80a9894 11 WebAddNav(ONE_WIRE_PAGE);
andrewboyson 3:3204c80a9894 12 WebAddH1("1-Wire");
andrewboyson 2:79cad6a51fd0 13
andrewboyson 3:3204c80a9894 14 WebAddH2("1-wire bus timings");
andrewboyson 3:3204c80a9894 15 WebAddAjaxLabelled ("Scan time ms", "ajax-1-wire-scan-time" );
andrewboyson 3:3204c80a9894 16 WebAddAjaxLabelled ("Low start tweak", "ajax-1-wire-tweak-low" );
andrewboyson 3:3204c80a9894 17 WebAddAjaxLabelled ("Float start tweak", "ajax-1-wire-tweak-float" );
andrewboyson 3:3204c80a9894 18 WebAddAjaxLabelled ("Read start tweak", "ajax-1-wire-tweak-read" );
andrewboyson 3:3204c80a9894 19 WebAddAjaxLabelled ("High start tweak", "ajax-1-wire-tweak-high" );
andrewboyson 3:3204c80a9894 20 WebAddAjaxLabelled ("Release start tweak", "ajax-1-wire-tweak-release");
andrewboyson 3:3204c80a9894 21 WebAddAjaxInputToggle("One wire trace", "ajax-1-wire-trace" , "onewiretrace");
andrewboyson 2:79cad6a51fd0 22
andrewboyson 3:3204c80a9894 23 WebAddH2("DS18B20 1-wire devices");
andrewboyson 2:79cad6a51fd0 24 HttpAddText("<code id='ajax-device-values'></code>\r\n");
andrewboyson 2:79cad6a51fd0 25
andrewboyson 3:3204c80a9894 26 WebAddH2("ROMs");
andrewboyson 3:3204c80a9894 27 WebAddAjaxInputLabelId("ajax-name-0", 11, "ajax-rom-0", "rom0");
andrewboyson 3:3204c80a9894 28 WebAddAjaxInputLabelId("ajax-name-1", 11, "ajax-rom-1", "rom1");
andrewboyson 3:3204c80a9894 29 WebAddAjaxInputLabelId("ajax-name-2", 11, "ajax-rom-2", "rom2");
andrewboyson 3:3204c80a9894 30 WebAddAjaxInputLabelId("ajax-name-3", 11, "ajax-rom-3", "rom3");
andrewboyson 10:b4e0b4c4e045 31 WebAddAjaxInputLabelId("ajax-name-4", 11, "ajax-rom-4", "rom4");
andrewboyson 10:b4e0b4c4e045 32 WebAddAjaxInputLabelId("ajax-name-5", 11, "ajax-rom-5", "rom5");
andrewboyson 10:b4e0b4c4e045 33 WebAddAjaxInputLabelId("ajax-name-6", 11, "ajax-rom-6", "rom6");
andrewboyson 10:b4e0b4c4e045 34 WebAddAjaxInputLabelId("ajax-name-7", 11, "ajax-rom-7", "rom7");
andrewboyson 2:79cad6a51fd0 35
andrewboyson 3:3204c80a9894 36 WebAddEnd();
andrewboyson 2:79cad6a51fd0 37 }