mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-06 11:36:59 +03:00
Merge remote-tracking branch 'origin/master' into httpd
This commit is contained in:
@@ -89,7 +89,7 @@ const spi_bus_config_t * config_spi_get(spi_host_device_t * spi_host) {
|
||||
*
|
||||
*/
|
||||
void parse_set_GPIO(void (*cb)(int gpio, char *value)) {
|
||||
char *nvs_item, *p, type[4];
|
||||
char *nvs_item, *p, type[16];
|
||||
int gpio;
|
||||
|
||||
if ((nvs_item = config_alloc_get(NVS_TYPE_STR, "set_GPIO")) == NULL) return;
|
||||
@@ -97,7 +97,7 @@ void parse_set_GPIO(void (*cb)(int gpio, char *value)) {
|
||||
p = nvs_item;
|
||||
|
||||
do {
|
||||
if (sscanf(p, "%d=%3[^,]", &gpio, type) > 0) cb(gpio, type);
|
||||
if (sscanf(p, "%d=%15[^,]", &gpio, type) > 0) cb(gpio, type);
|
||||
p = strchr(p, ',');
|
||||
} while (p++);
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ void set_led_gpio(int gpio, char *value) {
|
||||
green.gpio = gpio;
|
||||
if ((p = strchr(value, ':')) != NULL) green.active = atoi(p + 1);
|
||||
} else if (strcasestr(value, "red")) {
|
||||
red.active = gpio;
|
||||
red.gpio = gpio;
|
||||
if ((p = strchr(value, ':')) != NULL) red.active = atoi(p + 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user