mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-27 05:06:44 +00:00
Fix antiburn on rotated display
This commit is contained in:
parent
f18403d9c3
commit
7533a71bbb
@ -214,11 +214,13 @@ void hasp_antiburn_cb(lv_task_t* task)
|
|||||||
lv_area_t area;
|
lv_area_t area;
|
||||||
|
|
||||||
area.x1 = 0;
|
area.x1 = 0;
|
||||||
area.x2 = disp_drv->hor_res - 1;
|
// area.x2 = disp_drv->hor_res - 1;
|
||||||
lv_color_t color[disp_drv->hor_res];
|
// lv_color_t color[disp_drv->hor_res];
|
||||||
|
area.x2 = lv_obj_get_width(layer) - 1;
|
||||||
|
lv_color_t color[area.x2];
|
||||||
|
|
||||||
for(lv_coord_t y = 0; y < disp_drv->ver_res; y++) {
|
for(lv_coord_t y = 0; y < lv_obj_get_height(layer); y++) {
|
||||||
for(lv_coord_t x = 0; x < disp_drv->hor_res; x++) {
|
for(lv_coord_t x = 0; x < area.x2; x++) {
|
||||||
#if defined(WINDOWS) || defined(POSIX)
|
#if defined(WINDOWS) || defined(POSIX)
|
||||||
color[x].full = rand() * UINT16_MAX;
|
color[x].full = rand() * UINT16_MAX;
|
||||||
#elif defined(ARDUINO)
|
#elif defined(ARDUINO)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user