Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: net 1-wire lpc1768 crypto clock web fram log
web-radiator-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 WebRadiatorAjax() 00012 { 00013 HttpOk("text/plain; charset=UTF-8", "no-cache", NULL, NULL); 00014 00015 HttpAddInt16AsHex(RadiatorGetHallDS18B20Value()); HttpAddChar('\n'); 00016 00017 int nibble = 0; 00018 if (ProgramTimerOutput ) nibble |= 0x01; 00019 if (RadiatorGetWinter() ) nibble |= 0x02; 00020 if (RadiatorGetOverride()) nibble |= 0x04; 00021 if (RadiatorPump ) nibble |= 0x08; 00022 HttpAddNibbleAsHex (nibble); HttpAddChar('\n'); 00023 00024 HttpAddByteAsHex (RadiatorGetOverrideCancelHour() ); HttpAddChar('\n'); 00025 HttpAddByteAsHex (RadiatorGetOverrideCancelMinute()); HttpAddChar('\n'); 00026 HttpAddInt16AsHex(RadiatorGetNightTemperature() ); HttpAddChar('\n'); 00027 HttpAddInt16AsHex(RadiatorGetFrostTemperature() ); HttpAddChar('\n'); 00028 } 00029
Generated on Tue Jul 12 2022 18:50:15 by
