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: 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
diff -r 000000000000 -r 22b158d3c76f web-this/radiator/web-radiator-query.c
--- /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);
+ }
+}
+