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
http-derived/system/http-system-ajax.c
- Committer:
- andrewboyson
- Date:
- 2019-04-23
- Revision:
- 47:229338b3adcb
- Child:
- 48:6eac12df3ad5
File content as of revision 47:229338b3adcb:
#include <stdint.h> #include <stdio.h> #include "http.h" #include "http-server.h" #include "boiler.h" #include "radiator.h" #include "ds18b20.h" #include "program.h" #include "1-wire.h" #include "1-wire-bus.h" #include "1-wire-device.h" static void addRomToHttp(char* pRom) { for (char* p = pRom; p < pRom + 8; p++) HttpAddByteAsHex(*p); } void HttpSystemAjax() { HttpOk("text/plain; charset=UTF-8", "no-cache", NULL, NULL); addRomToHttp(RadiatorGetHallRom()); HttpAddChar('\n'); addRomToHttp(BoilerGetTankRom ()); HttpAddChar('\n'); addRomToHttp(BoilerGetOutputRom()); HttpAddChar('\n'); addRomToHttp(BoilerGetReturnRom()); HttpAddChar('\n'); HttpAddChar('\f'); for (int device = 0; device < DeviceCount; device++) { addRomToHttp ( DeviceList + device * 8); HttpAddInt16AsHex(*(DS18B20Value + device) ); HttpAddChar('\n'); } HttpAddChar('\f'); HttpAddInt16AsHex (DeviceScanMs); HttpAddChar('\n'); HttpAddInt16AsHex (OneWireBusLowTweak); HttpAddChar('\n'); HttpAddInt16AsHex (OneWireBusFloatTweak); HttpAddChar('\n'); HttpAddInt16AsHex (OneWireBusReadTweak); HttpAddChar('\n'); HttpAddInt16AsHex (OneWireBusHighTweak); HttpAddChar('\n'); HttpAddInt16AsHex (OneWireBusReleaseTweak); HttpAddChar('\n'); HttpAddNibbleAsHex(OneWireTrace); HttpAddChar('\n'); }