Dependencies: net 1-wire lpc1768 crypto clock web fram log
/media/uploads/andrewboyson/heating.sch
/media/uploads/andrewboyson/heating.brd
/media/uploads/andrewboyson/eagle.epf
http-derived/heating/http-heating-html.c@24:e3ed1b52c6e6, 2019-01-17 (annotated)
- Committer:
- andrewboyson
- Date:
- Thu Jan 17 13:42:54 2019 +0000
- Revision:
- 24:e3ed1b52c6e6
- Child:
- 34:18a3fc737899
Updated http-base library
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
andrewboyson | 24:e3ed1b52c6e6 | 1 | #include "http.h" |
andrewboyson | 24:e3ed1b52c6e6 | 2 | #include "page.h" |
andrewboyson | 24:e3ed1b52c6e6 | 3 | #include "page-derived.h" |
andrewboyson | 24:e3ed1b52c6e6 | 4 | #include "ds18b20.h" |
andrewboyson | 24:e3ed1b52c6e6 | 5 | #include "radiator.h" |
andrewboyson | 24:e3ed1b52c6e6 | 6 | #include "program.h" |
andrewboyson | 24:e3ed1b52c6e6 | 7 | #include "http-server.h" |
andrewboyson | 24:e3ed1b52c6e6 | 8 | #include "http-server-derived.h" |
andrewboyson | 24:e3ed1b52c6e6 | 9 | |
andrewboyson | 24:e3ed1b52c6e6 | 10 | void HttpHeatingHtml() |
andrewboyson | 24:e3ed1b52c6e6 | 11 | { |
andrewboyson | 24:e3ed1b52c6e6 | 12 | HttpOk("text/html; charset=UTF-8", "no-cache", NULL, NULL); |
andrewboyson | 24:e3ed1b52c6e6 | 13 | PageAddHeader(PageSite, "Radiators", "settings.css", "heating.js"); |
andrewboyson | 24:e3ed1b52c6e6 | 14 | PageAddNav(HEATING_PAGE); |
andrewboyson | 24:e3ed1b52c6e6 | 15 | PageAddH1(PageSite, "Radiators"); |
andrewboyson | 24:e3ed1b52c6e6 | 16 | |
andrewboyson | 24:e3ed1b52c6e6 | 17 | int16_t temp = DS18B20ValueFromRom(RadiatorGetHallRom()); |
andrewboyson | 24:e3ed1b52c6e6 | 18 | char text[DS18B20_VALUE_STRING_LENGTH]; |
andrewboyson | 24:e3ed1b52c6e6 | 19 | DS18B20ValueToString(temp, text); |
andrewboyson | 24:e3ed1b52c6e6 | 20 | PageAddLabelledValue("Hall" , 10, text); |
andrewboyson | 24:e3ed1b52c6e6 | 21 | PageAddLabelledOnOff("Winter mode" , 10, RadiatorGetMode()); |
andrewboyson | 24:e3ed1b52c6e6 | 22 | |
andrewboyson | 24:e3ed1b52c6e6 | 23 | PageAddH2("Parameters"); |
andrewboyson | 24:e3ed1b52c6e6 | 24 | PageAddIntInput("/heating", 0, "Winter (night)", 10, "nighttemp", 2, RadiatorGetNightTemperature()); |
andrewboyson | 24:e3ed1b52c6e6 | 25 | PageAddIntInput("/heating", 0, "Summer (frost)", 10, "frosttemp", 2, RadiatorGetFrostTemperature()); |
andrewboyson | 24:e3ed1b52c6e6 | 26 | |
andrewboyson | 24:e3ed1b52c6e6 | 27 | PageAddH2("Output"); |
andrewboyson | 24:e3ed1b52c6e6 | 28 | PageAddLabelledOnOff("Radiator pump" , 10, RadiatorPump); |
andrewboyson | 24:e3ed1b52c6e6 | 29 | |
andrewboyson | 24:e3ed1b52c6e6 | 30 | PageAddEnd(); |
andrewboyson | 24:e3ed1b52c6e6 | 31 | |
andrewboyson | 24:e3ed1b52c6e6 | 32 | } |