Dependencies: 1-wire clock crypto fram log lpc1768 net web wiz mbed
Diff: web-this/radiator/web-radiator-query.c
- Revision:
- 0:22b158d3c76f
- Child:
- 5:3579001bea1b
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web-this/radiator/web-radiator-query.c Mon May 10 10:23:48 2021 +0000 @@ -0,0 +1,30 @@ +#include <string.h> +#include <stdlib.h> +#include "http.h" +#include "radiator.h" + +void WebRadiatorQuery(char* pQuery) +{ + while (pQuery) + { + char* pName; + char* pValue; + pQuery = HttpQuerySplit(pQuery, &pName, &pValue); + int value = HttpQueryValueAsInt(pValue); + + if (HttpSameStr(pName, "overridecancelminute")) + { + int hour = value / 100; + int minute = value % 100; + RadiatorSetOverrideCancelHour (hour); + RadiatorSetOverrideCancelMinute(minute); + } + + if (HttpSameStr(pName, "htg-chg-mode" )) RadiatorChgWinter(); + if (HttpSameStr(pName, "htg-chg-override" )) RadiatorChgOverride(); + + if (HttpSameStr(pName, "nighttemp" )) RadiatorSetNightTemperature(value); + if (HttpSameStr(pName, "frosttemp" )) RadiatorSetFrostTemperature(value); + } +} +