Merge pull request #299 from bchabrier/small_fixes

Small fixes
This commit is contained in:
martin-ger
2019-04-15 14:43:37 +02:00
committed by GitHub
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -164,7 +164,7 @@ uint32_t reg0, reg1, reg3;
int i;
for (i=0; i<17; i++)
{
config->gpiomode[1] = UNDEFINED;
config->gpiomode[i] = UNDEFINED;
config->gpio_trigger_pin[i] = -1;
config->gpio_trigger_type[i] = NONE;
}
+2 -2
View File
@@ -2705,13 +2705,13 @@ void ICACHE_FLASH_ATTR console_handle_command(struct espconn *pespconn)
uint8_t *action = tokens[2]; // mode|set|get
uint8_t *value = nTokens >= 4 ? tokens[3] : "";
if ((pin < 0) && (pin > 16))
if ((pin < 0) || (pin > 16))
{
os_sprintf_flash(response, "Invalid pin number (try 0-16)\r\n");
goto command_handled;
}
os_sprintf(response, "Successfuly executed %d %s %s\r\n", pin, action, value);
os_sprintf(response, "Successfully executed %d %s %s\r\n", pin, action, value);
if (strcmp(action, "mode")==0)
{