mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-04-19 12:57:19 +00:00
Add clearpage=all
This commit is contained in:
parent
971dbe5ff0
commit
731ffb31c3
@ -871,10 +871,15 @@ void dispatch_page(const char*, const char* page)
|
||||
void dispatch_clear_page(const char*, const char* page)
|
||||
{
|
||||
uint8_t pageid;
|
||||
if(strlen(page) > 0)
|
||||
pageid = atoi(page);
|
||||
else
|
||||
if(strlen(page) > 0) {
|
||||
if(!strcasecmp_P(page, PSTR("all"))) {
|
||||
for(pageid = 0; pageid < HASP_NUM_PAGES; pageid++) haspPages.clear(pageid);
|
||||
} else {
|
||||
pageid = atoi(page);
|
||||
}
|
||||
} else {
|
||||
pageid = haspPages.get();
|
||||
}
|
||||
haspPages.clear(pageid);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user