Andrew Boyson / oldheating

Dependencies:   net 1-wire lpc1768 crypto clock web fram log

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers web-program-ajax.c Source File

web-program-ajax.c

00001 #include  <stdint.h>
00002 #include   <stdio.h>
00003 
00004 #include "http.h"
00005 #include "boiler.h"
00006 #include "radiator.h"
00007 #include "ds18b20.h"
00008 #include "program.h"
00009 #include "1-wire-device.h"
00010 
00011 void WebProgramAjax()
00012 {
00013     HttpOk("text/plain; charset=UTF-8", "no-cache", NULL, NULL);
00014     
00015     HttpAddNibbleAsHex(ProgramTimerOutput    ); HttpAddChar('\n');
00016     HttpAddByteAsHex  (ProgramGetNewDayHour()); HttpAddChar('\n');
00017     HttpAddNibbleAsHex(ProgramGetDay(1)      ); HttpAddChar(',');
00018     HttpAddNibbleAsHex(ProgramGetDay(2)      ); HttpAddChar(',');
00019     HttpAddNibbleAsHex(ProgramGetDay(3)      ); HttpAddChar(',');
00020     HttpAddNibbleAsHex(ProgramGetDay(4)      ); HttpAddChar(',');
00021     HttpAddNibbleAsHex(ProgramGetDay(5)      ); HttpAddChar(',');
00022     HttpAddNibbleAsHex(ProgramGetDay(6)      ); HttpAddChar(',');
00023     HttpAddNibbleAsHex(ProgramGetDay(0)      ); HttpAddChar('\n');
00024     ProgramSendAjax();
00025     
00026 }