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:
Tue Apr 23 18:47:47 2019 +0000
Revision:
47:229338b3adcb
Child:
48:6eac12df3ad5
Provided individual scripts per page and moved most inputs to ajax.

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 "http-server.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 47:229338b3adcb 12 void HttpProgramAjax()
andrewboyson 47:229338b3adcb 13 {
andrewboyson 47:229338b3adcb 14 HttpOk("text/plain; charset=UTF-8", "no-cache", NULL, NULL);
andrewboyson 47:229338b3adcb 15
andrewboyson 47:229338b3adcb 16 HttpAddNibbleAsHex (ProgramTimerOutput); HttpAddChar('\n');
andrewboyson 47:229338b3adcb 17
andrewboyson 47:229338b3adcb 18 const int PROGRAM_CHARACTER_LENGTH = 30;
andrewboyson 47:229338b3adcb 19 char value[PROGRAM_CHARACTER_LENGTH];
andrewboyson 47:229338b3adcb 20 ProgramToString(0, PROGRAM_CHARACTER_LENGTH, value); HttpAddText(value); HttpAddChar('\n');
andrewboyson 47:229338b3adcb 21 ProgramToString(1, PROGRAM_CHARACTER_LENGTH, value); HttpAddText(value); HttpAddChar('\n');
andrewboyson 47:229338b3adcb 22 ProgramToString(2, PROGRAM_CHARACTER_LENGTH, value); HttpAddText(value); HttpAddChar('\n');
andrewboyson 47:229338b3adcb 23
andrewboyson 47:229338b3adcb 24 HttpAddNibbleAsHex(ProgramGetDay(1) + 1); HttpAddChar('\n');
andrewboyson 47:229338b3adcb 25 HttpAddNibbleAsHex(ProgramGetDay(2) + 1); HttpAddChar('\n');
andrewboyson 47:229338b3adcb 26 HttpAddNibbleAsHex(ProgramGetDay(3) + 1); HttpAddChar('\n');
andrewboyson 47:229338b3adcb 27 HttpAddNibbleAsHex(ProgramGetDay(4) + 1); HttpAddChar('\n');
andrewboyson 47:229338b3adcb 28 HttpAddNibbleAsHex(ProgramGetDay(5) + 1); HttpAddChar('\n');
andrewboyson 47:229338b3adcb 29 HttpAddNibbleAsHex(ProgramGetDay(6) + 1); HttpAddChar('\n');
andrewboyson 47:229338b3adcb 30 HttpAddNibbleAsHex(ProgramGetDay(0) + 1); HttpAddChar('\n');
andrewboyson 47:229338b3adcb 31
andrewboyson 47:229338b3adcb 32 HttpAddByteAsHex (ProgramGetNewDayHour()); HttpAddChar('\n');
andrewboyson 47:229338b3adcb 33 }