mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-24 11:46:34 +00:00
Code cleanup
This commit is contained in:
parent
7954c1912b
commit
c9f7609eed
@ -105,8 +105,8 @@ bool guiCheckSleep()
|
||||
return (guiSleeping != HASP_SLEEP_OFF);
|
||||
}
|
||||
|
||||
/* Experimental Display flushing */
|
||||
static void IRAM_ATTR my_flush_cb(lv_disp_drv_t * disp, const lv_area_t * area, lv_color_t * color_p)
|
||||
/* After flusing to the file stream or web client, we also send the buffer to the tft */
|
||||
static void IRAM_ATTR printscreen_flush_cb(lv_disp_drv_t * disp, const lv_area_t * area, lv_color_t * color_p)
|
||||
{
|
||||
#if 0
|
||||
size_t len = (area->x2 - area->x1 + 1) * (area->y2 - area->y1 + 1); /* Number of pixels */
|
||||
@ -130,7 +130,7 @@ static void IRAM_ATTR my_flush_cb(lv_disp_drv_t * disp, const lv_area_t * area,
|
||||
#endif
|
||||
|
||||
/* Tell lvgl that flushing is done */
|
||||
// lv_disp_flush_ready(disp);
|
||||
// lv_disp_flush_ready(disp); ===> moved into the drivers
|
||||
}
|
||||
|
||||
/* Interrupt driven periodic handler */
|
||||
@ -911,7 +911,7 @@ static void gui_screenshot_to_file(lv_disp_drv_t * disp, const lv_area_t * area,
|
||||
len *= sizeof(lv_color_t); /* Number of bytes */
|
||||
size_t res = pFileOut.write((uint8_t *)color_p, len);
|
||||
if(res != len) gui_flush_not_complete();
|
||||
my_flush_cb(disp, area, color_p);
|
||||
printscreen_flush_cb(disp, area, color_p);
|
||||
}
|
||||
|
||||
/** Take Screenshot.
|
||||
@ -965,7 +965,7 @@ static void gui_screenshot_to_http(lv_disp_drv_t * disp, const lv_area_t * area,
|
||||
len *= sizeof(lv_color_t); /* Number of bytes */
|
||||
size_t res = httpClientWrite((uint8_t *)color_p, len);
|
||||
if(res != len) gui_flush_not_complete();
|
||||
my_flush_cb(disp, area, color_p);
|
||||
printscreen_flush_cb(disp, area, color_p);
|
||||
}
|
||||
|
||||
/** Take Screenshot.
|
||||
|
@ -486,7 +486,7 @@ void mqttStop()
|
||||
|
||||
size_t len;
|
||||
snprintf_P(tmp_topic, sizeof(tmp_topic), PSTR("%sstatus"), mqttNodeTopic);
|
||||
len = snprintf_P(tmp_payload, sizeof(tmp_payload), PSTR("OFF"), mqttNodeTopic);
|
||||
len = snprintf_P(tmp_payload, sizeof(tmp_payload), PSTR("OFF"));
|
||||
mqttPublish(tmp_topic, tmp_payload, len);
|
||||
|
||||
mqttClient.disconnect();
|
||||
|
Loading…
x
Reference in New Issue
Block a user