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:
Mon May 06 07:55:09 2019 +0000
Revision:
57:72c1c1357861
Parent:
53:c1bf7d9db507
Child:
96:18a3813bb4b5
Added a 'hall' module to manage the hall led and hall pushbutton. Some of the work done in the 'radiator' module was moved to the hall module.

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 47:229338b3adcb 5 #include "boiler.h"
andrewboyson 47:229338b3adcb 6 #include "radiator.h"
andrewboyson 47:229338b3adcb 7 #include "ds18b20.h"
andrewboyson 47:229338b3adcb 8 #include "program.h"
andrewboyson 47:229338b3adcb 9 #include "1-wire-device.h"
andrewboyson 47:229338b3adcb 10
andrewboyson 49:9491c966dc60 11 void WebRadiatorAjax()
andrewboyson 47:229338b3adcb 12 {
andrewboyson 47:229338b3adcb 13 HttpOk("text/plain; charset=UTF-8", "no-cache", NULL, NULL);
andrewboyson 47:229338b3adcb 14
andrewboyson 48:6eac12df3ad5 15 HttpAddInt16AsHex(RadiatorGetHallDS18B20Value()); HttpAddChar('\n');
andrewboyson 47:229338b3adcb 16
andrewboyson 47:229338b3adcb 17 int nibble = 0;
andrewboyson 47:229338b3adcb 18 if (ProgramTimerOutput ) nibble |= 0x01;
andrewboyson 57:72c1c1357861 19 if (RadiatorGetWinter() ) nibble |= 0x02;
andrewboyson 47:229338b3adcb 20 if (RadiatorGetOverride()) nibble |= 0x04;
andrewboyson 47:229338b3adcb 21 if (RadiatorPump ) nibble |= 0x08;
andrewboyson 47:229338b3adcb 22 HttpAddNibbleAsHex (nibble); HttpAddChar('\n');
andrewboyson 47:229338b3adcb 23
andrewboyson 47:229338b3adcb 24 HttpAddInt16AsHex(RadiatorGetNightTemperature()); HttpAddChar('\n');
andrewboyson 47:229338b3adcb 25 HttpAddInt16AsHex(RadiatorGetFrostTemperature()); HttpAddChar('\n');
andrewboyson 47:229338b3adcb 26
andrewboyson 47:229338b3adcb 27 }
andrewboyson 47:229338b3adcb 28