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-program-query.c
00001 #include <string.h> 00002 #include <stdlib.h> 00003 #include "http.h" 00004 #include "program.h" 00005 00006 void WebProgramQuery(char* pQuery) 00007 { 00008 while (pQuery) 00009 { 00010 char* pName; 00011 char* pValue; 00012 pQuery = HttpQuerySplit(pQuery, &pName, &pValue); 00013 00014 HttpQueryUnencode(pValue); 00015 int value = HttpQueryValueAsInt(pValue); 00016 int program = value; 00017 if (program < 1) program = 1; 00018 if (program > 3) program = 3; 00019 program--; 00020 00021 if (HttpSameStr(pName, "program1" )) ProgramParse (0, pValue); 00022 if (HttpSameStr(pName, "program2" )) ProgramParse (1, pValue); 00023 if (HttpSameStr(pName, "program3" )) ProgramParse (2, pValue); 00024 if (HttpSameStr(pName, "mon" )) ProgramSetDay(1, program); 00025 if (HttpSameStr(pName, "tue" )) ProgramSetDay(2, program); 00026 if (HttpSameStr(pName, "wed" )) ProgramSetDay(3, program); 00027 if (HttpSameStr(pName, "thu" )) ProgramSetDay(4, program); 00028 if (HttpSameStr(pName, "fri" )) ProgramSetDay(5, program); 00029 if (HttpSameStr(pName, "sat" )) ProgramSetDay(6, program); 00030 if (HttpSameStr(pName, "sun" )) ProgramSetDay(0, program); 00031 if (HttpSameStr(pName, "newdayhour")) ProgramSetNewDayHour(value); 00032 00033 } 00034 }
Generated on Tue Jul 12 2022 18:50:15 by
