Central Heating controller using the real time clock, PHY module for internet, 1-wire interface for temperature sensors, a system log and a configuration file

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

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?

UserRevisionLine numberNew 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 "boiler.h"
andrewboyson 24:e3ed1b52c6e6 5 #include "ds18b20.h"
andrewboyson 24:e3ed1b52c6e6 6 #include "http-server.h"
andrewboyson 24:e3ed1b52c6e6 7
andrewboyson 24:e3ed1b52c6e6 8 void HttpBoilerHtml()
andrewboyson 24:e3ed1b52c6e6 9 {
andrewboyson 24:e3ed1b52c6e6 10 HttpOk("text/html; charset=UTF-8", "no-cache", NULL, NULL);
andrewboyson 24:e3ed1b52c6e6 11 PageAddHeader(PageSite, "Boiler", "settings.css", NULL);
andrewboyson 24:e3ed1b52c6e6 12 PageAddNav(BOILER_PAGE);
andrewboyson 24:e3ed1b52c6e6 13 PageAddH1(PageSite, "Boiler");
andrewboyson 24:e3ed1b52c6e6 14
andrewboyson 24:e3ed1b52c6e6 15 int16_t temp;
andrewboyson 24:e3ed1b52c6e6 16 char text[DS18B20_VALUE_STRING_LENGTH];
andrewboyson 24:e3ed1b52c6e6 17 temp = DS18B20ValueFromRom(BoilerGetTankRom()); DS18B20ValueToString(temp, text); PageAddLabelledValue("Tank", 10, text);
andrewboyson 24:e3ed1b52c6e6 18 temp = DS18B20ValueFromRom(BoilerGetOutputRom()); DS18B20ValueToString(temp, text); PageAddLabelledValue("Boiler output", 10, text);
andrewboyson 24:e3ed1b52c6e6 19 temp = DS18B20ValueFromRom(BoilerGetReturnRom()); DS18B20ValueToString(temp, text); PageAddLabelledValue("Boiler return", 10, text);
andrewboyson 24:e3ed1b52c6e6 20
andrewboyson 24:e3ed1b52c6e6 21 PageAddH2("Parameters");
andrewboyson 24:e3ed1b52c6e6 22 PageAddIntInput("/boiler", 0, "Tank set point", 10, "tanksetpoint", 2, BoilerGetTankSetPoint());
andrewboyson 24:e3ed1b52c6e6 23 PageAddIntInput("/boiler", 0, "Tank hysteresis", 10, "tankhysteresis", 2, BoilerGetTankHysteresis());
andrewboyson 24:e3ed1b52c6e6 24 PageAddIntInput("/boiler", 0, "Boiler run on residual", 10, "boilerresidual", 2, BoilerGetRunOnResidual());
andrewboyson 24:e3ed1b52c6e6 25 PageAddIntInput("/boiler", 0, "Boiler run on time", 10, "boilerrunon", 2, BoilerGetRunOnTime());
andrewboyson 24:e3ed1b52c6e6 26
andrewboyson 24:e3ed1b52c6e6 27 PageAddH2("Outputs");
andrewboyson 24:e3ed1b52c6e6 28 PageAddLabelledOnOff("Boiler call", 10, BoilerCall);
andrewboyson 24:e3ed1b52c6e6 29 PageAddLabelledOnOff("Boiler pump", 10, BoilerPump);
andrewboyson 24:e3ed1b52c6e6 30
andrewboyson 24:e3ed1b52c6e6 31 PageAddEnd();
andrewboyson 24:e3ed1b52c6e6 32
andrewboyson 24:e3ed1b52c6e6 33 }