mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-26 12:46:37 +00:00
Add delete GPIO config
This commit is contained in:
parent
c04b64eee4
commit
929a4a5041
@ -1224,6 +1224,11 @@ void webHandleGpioConfig()
|
|||||||
uint8_t pinfunc = webServer.arg(F("func")).toInt();
|
uint8_t pinfunc = webServer.arg(F("func")).toInt();
|
||||||
gpioSavePinConfig(id, pin, type, group, pinfunc);
|
gpioSavePinConfig(id, pin, type, group, pinfunc);
|
||||||
}
|
}
|
||||||
|
if(webServer.hasArg(PSTR("del"))) {
|
||||||
|
uint8_t id = webServer.arg(F("id")).toInt();
|
||||||
|
uint8_t pin = webServer.arg(F("pin")).toInt();
|
||||||
|
gpioSavePinConfig(id, pin, HASP_GPIO_FREE, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
String httpMessage((char *)0);
|
String httpMessage((char *)0);
|
||||||
@ -1284,8 +1289,10 @@ void webHandleGpioConfig()
|
|||||||
|
|
||||||
httpMessage += F("</td><td><a href='/config/gpio/options?id=");
|
httpMessage += F("</td><td><a href='/config/gpio/options?id=");
|
||||||
httpMessage += id;
|
httpMessage += id;
|
||||||
httpMessage += ("'>Edit</a> <a href='/config/gpio?save=&id=");
|
httpMessage += ("'>Edit</a> <a href='/config/gpio?del=&id=");
|
||||||
httpMessage += id;
|
httpMessage += id;
|
||||||
|
httpMessage += ("&pin=");
|
||||||
|
httpMessage += conf.pin;
|
||||||
httpMessage += ("'>Delete</a></td><tr>");
|
httpMessage += ("'>Delete</a></td><tr>");
|
||||||
configCount++;
|
configCount++;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user