Central Heating controller using the real time clock, PHY module for internet, 1-wire interface for temperature sensors, a system log and a configuration file
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
web-this/radiator/web-radiator-query.c@106:41ed3ea0bbba, 2021-04-23 (annotated)
- Committer:
- andrewboyson
- Date:
- Fri Apr 23 08:36:42 2021 +0000
- Revision:
- 106:41ed3ea0bbba
- Parent:
- 96:18a3813bb4b5
Not working, crashes.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
andrewboyson | 35:bb8a6d1c034c | 1 | #include <string.h> |
andrewboyson | 35:bb8a6d1c034c | 2 | #include <stdlib.h> |
andrewboyson | 35:bb8a6d1c034c | 3 | #include "http.h" |
andrewboyson | 35:bb8a6d1c034c | 4 | #include "radiator.h" |
andrewboyson | 35:bb8a6d1c034c | 5 | |
andrewboyson | 49:9491c966dc60 | 6 | void WebRadiatorQuery(char* pQuery) |
andrewboyson | 35:bb8a6d1c034c | 7 | { |
andrewboyson | 35:bb8a6d1c034c | 8 | while (pQuery) |
andrewboyson | 35:bb8a6d1c034c | 9 | { |
andrewboyson | 35:bb8a6d1c034c | 10 | char* pName; |
andrewboyson | 35:bb8a6d1c034c | 11 | char* pValue; |
andrewboyson | 35:bb8a6d1c034c | 12 | pQuery = HttpQuerySplit(pQuery, &pName, &pValue); |
andrewboyson | 39:5d8a37c921c3 | 13 | int value = HttpQueryValueAsInt(pValue); |
andrewboyson | 35:bb8a6d1c034c | 14 | |
andrewboyson | 96:18a3813bb4b5 | 15 | if (HttpSameStr(pName, "overridecancelminute")) |
andrewboyson | 96:18a3813bb4b5 | 16 | { |
andrewboyson | 96:18a3813bb4b5 | 17 | int hour = value / 100; |
andrewboyson | 96:18a3813bb4b5 | 18 | int minute = value % 100; |
andrewboyson | 96:18a3813bb4b5 | 19 | RadiatorSetOverrideCancelHour (hour); |
andrewboyson | 96:18a3813bb4b5 | 20 | RadiatorSetOverrideCancelMinute(minute); |
andrewboyson | 96:18a3813bb4b5 | 21 | } |
andrewboyson | 96:18a3813bb4b5 | 22 | |
andrewboyson | 96:18a3813bb4b5 | 23 | if (HttpSameStr(pName, "htg-chg-mode" )) RadiatorChgWinter(); |
andrewboyson | 96:18a3813bb4b5 | 24 | if (HttpSameStr(pName, "htg-chg-override" )) RadiatorChgOverride(); |
andrewboyson | 96:18a3813bb4b5 | 25 | |
andrewboyson | 96:18a3813bb4b5 | 26 | if (HttpSameStr(pName, "nighttemp" )) RadiatorSetNightTemperature(value); |
andrewboyson | 96:18a3813bb4b5 | 27 | if (HttpSameStr(pName, "frosttemp" )) RadiatorSetFrostTemperature(value); |
andrewboyson | 35:bb8a6d1c034c | 28 | } |
andrewboyson | 35:bb8a6d1c034c | 29 | } |
andrewboyson | 35:bb8a6d1c034c | 30 |