Back to default

pull/84/head
KatAst 9 years ago
parent 62c5f4fc17
commit a10cc380dc
  1. 2
      esp-link/cgi.c
  2. 2
      esp-link/cgi.h
  3. 2
      esp-link/cgipins.c

@ -106,7 +106,7 @@ int8_t ICACHE_FLASH_ATTR getUInt16Arg(HttpdConnData *connData, char *name, uint1
return 1; return 1;
} }
int8_t ICACHE_FLASH_ATTR getBoolArg(HttpdConnData *connData, char *name, uint8_t *config) { int8_t ICACHE_FLASH_ATTR getBoolArg(HttpdConnData *connData, char *name, bool *config) {
char buff[16]; char buff[16];
int len = httpdFindArg(connData->getArgs, name, buff, sizeof(buff)); int len = httpdFindArg(connData->getArgs, name, buff, sizeof(buff));
if (len < 0) return 0; // not found, skip if (len < 0) return 0; // not found, skip

@ -26,7 +26,7 @@ int8_t getUInt16Arg(HttpdConnData *connData, char *name, uint16_t *config);
// Get the HTTP query-string param 'name' and store it boolean value at 'config', // Get the HTTP query-string param 'name' and store it boolean value at 'config',
// supports 1/true and 0/false, returns -1 on error, 0 if not found, 1 if found // supports 1/true and 0/false, returns -1 on error, 0 if not found, 1 if found
int8_t getBoolArg(HttpdConnData *connData, char *name, uint8_t *config); int8_t getBoolArg(HttpdConnData *connData, char *name, bool *config);
int cgiMenu(HttpdConnData *connData); int cgiMenu(HttpdConnData *connData);

@ -49,7 +49,7 @@ int ICACHE_FLASH_ATTR cgiPinsSet(HttpdConnData *connData) {
int8_t ok = 0; int8_t ok = 0;
int8_t reset, isp, conn, ser; int8_t reset, isp, conn, ser;
uint8_t swap, rxpup; bool swap, rxpup;
ok |= getInt8Arg(connData, "reset", &reset); ok |= getInt8Arg(connData, "reset", &reset);
ok |= getInt8Arg(connData, "isp", &isp); ok |= getInt8Arg(connData, "isp", &isp);
ok |= getInt8Arg(connData, "conn", &conn); ok |= getInt8Arg(connData, "conn", &conn);

Loading…
Cancel
Save