Controls the central heating system and the lights.

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

web-this/program/web-program-ajax.c

Committer:
andrewboyson
Date:
2022-11-12
Revision:
8:8ac076ce51af
Parent:
0:22b158d3c76f

File content as of revision 8:8ac076ce51af:

#include  <stdint.h>
#include   <stdio.h>

#include "http.h"
#include "boiler.h"
#include "radiator.h"
#include "ds18b20.h"
#include "program.h"
#include "1-wire-device.h"

void WebProgramAjax()
{
    HttpOk("text/plain; charset=UTF-8", "no-cache", NULL, NULL);
    
    HttpAddNibbleAsHex(ProgramTimerOutput    ); HttpAddChar('\n');
    HttpAddByteAsHex  (ProgramGetNewDayHour()); HttpAddChar('\n');
    HttpAddNibbleAsHex(ProgramGetDay(1)      ); HttpAddChar(',');
    HttpAddNibbleAsHex(ProgramGetDay(2)      ); HttpAddChar(',');
    HttpAddNibbleAsHex(ProgramGetDay(3)      ); HttpAddChar(',');
    HttpAddNibbleAsHex(ProgramGetDay(4)      ); HttpAddChar(',');
    HttpAddNibbleAsHex(ProgramGetDay(5)      ); HttpAddChar(',');
    HttpAddNibbleAsHex(ProgramGetDay(6)      ); HttpAddChar(',');
    HttpAddNibbleAsHex(ProgramGetDay(0)      ); HttpAddChar('\n');
    ProgramSendAjax();
    
}