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:
Sat Apr 27 09:27:11 2019 +0000
Revision:
49:9491c966dc60
Parent:
http-derived/boiler/http-boiler-ajax.c@48:6eac12df3ad5
Child:
52:76254a967391
Updated web library

Who changed what in which revision?

UserRevisionLine numberNew contents of line
andrewboyson 47:229338b3adcb 1 #include <stdint.h>
andrewboyson 47:229338b3adcb 2 #include <stdio.h>
andrewboyson 47:229338b3adcb 3
andrewboyson 47:229338b3adcb 4 #include "http.h"
andrewboyson 49:9491c966dc60 5 #include "web-base.h"
andrewboyson 47:229338b3adcb 6 #include "boiler.h"
andrewboyson 47:229338b3adcb 7 #include "radiator.h"
andrewboyson 47:229338b3adcb 8 #include "ds18b20.h"
andrewboyson 47:229338b3adcb 9 #include "program.h"
andrewboyson 47:229338b3adcb 10 #include "1-wire-device.h"
andrewboyson 47:229338b3adcb 11
andrewboyson 49:9491c966dc60 12 void WebBoilerAjax()
andrewboyson 47:229338b3adcb 13 {
andrewboyson 47:229338b3adcb 14 HttpOk("text/plain; charset=UTF-8", "no-cache", NULL, NULL);
andrewboyson 47:229338b3adcb 15
andrewboyson 48:6eac12df3ad5 16 HttpAddInt16AsHex(BoilerGetTankDS18B20Value() ); HttpAddChar('\n');
andrewboyson 48:6eac12df3ad5 17 HttpAddInt16AsHex(BoilerGetOutputDS18B20Value()); HttpAddChar('\n');
andrewboyson 48:6eac12df3ad5 18 HttpAddInt16AsHex(BoilerGetReturnDS18B20Value()); HttpAddChar('\n');
andrewboyson 47:229338b3adcb 19
andrewboyson 47:229338b3adcb 20 int nibble = 0;
andrewboyson 47:229338b3adcb 21 if (BoilerCall ) nibble |= 1;
andrewboyson 47:229338b3adcb 22 if (BoilerPump ) nibble |= 2;
andrewboyson 47:229338b3adcb 23 HttpAddNibbleAsHex (nibble); HttpAddChar('\n');
andrewboyson 47:229338b3adcb 24
andrewboyson 47:229338b3adcb 25 HttpAddInt16AsHex(BoilerGetTankSetPoint ()); HttpAddChar('\n');
andrewboyson 47:229338b3adcb 26 HttpAddInt16AsHex(BoilerGetTankHysteresis()); HttpAddChar('\n');
andrewboyson 47:229338b3adcb 27 HttpAddInt16AsHex(BoilerGetRunOnResidual ()); HttpAddChar('\n');
andrewboyson 47:229338b3adcb 28 HttpAddInt16AsHex(BoilerGetRunOnTime ()); HttpAddChar('\n');
andrewboyson 47:229338b3adcb 29
andrewboyson 47:229338b3adcb 30
andrewboyson 47:229338b3adcb 31 }
andrewboyson 47:229338b3adcb 32