mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-25 20:26:41 +00:00
Workaround "clearpage all" crashing on PC build
This commit is contained in:
parent
9b3c88492c
commit
b0969892fd
@ -967,7 +967,14 @@ void dispatch_page(const char*, const char* payload, uint8_t source)
|
|||||||
void dispatch_clear_page(const char*, const char* page, uint8_t source)
|
void dispatch_clear_page(const char*, const char* page, uint8_t source)
|
||||||
{
|
{
|
||||||
if(!strcasecmp(page, "all")) {
|
if(!strcasecmp(page, "all")) {
|
||||||
|
#if !HASP_TARGET_PC
|
||||||
hasp_init();
|
hasp_init();
|
||||||
|
#else
|
||||||
|
// workaround for "clearpage all" deadlocking or crashing on PC build (when called from non-LVGL thread)
|
||||||
|
for(uint8_t pageid = 0; pageid <= HASP_NUM_PAGES; pageid++) {
|
||||||
|
haspPages.clear(pageid);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user