Driveline: write labels only on change (idle 9.7 fps -> 0); perf: panel vsync counter + esp_timer reporting
Firmware / build (push) Successful in 4m2s
Firmware / build (push) Successful in 4m2s
This commit is contained in:
@@ -501,6 +501,14 @@ static void monitor_callback(lv_disp_drv_t *drv, uint32_t time_ms, uint32_t px)
|
||||
PerfMon::onFrame(time_ms, px);
|
||||
}
|
||||
|
||||
// RGB panel "refresh finished" (vsync) interrupt - counted for the perf monitor.
|
||||
static IRAM_ATTR bool onPerfVsyncCallback(void *user_data)
|
||||
{
|
||||
(void)user_data;
|
||||
PerfMon::onVsync();
|
||||
return false; // no context switch needed
|
||||
}
|
||||
|
||||
static void update_callback(lv_disp_drv_t *drv)
|
||||
{
|
||||
LCD *lcd = (LCD *)drv->user_data;
|
||||
@@ -820,6 +828,10 @@ bool lvgl_port_init(LCD *lcd, Touch *tp)
|
||||
|
||||
#if LVGL_PORT_AVOID_TEAR
|
||||
lcd->attachRefreshFinishCallback(onLcdVsyncCallback, (void *)lvgl_task_handle);
|
||||
#else
|
||||
if (bus_type == ESP_PANEL_BUS_TYPE_RGB) {
|
||||
lcd->attachRefreshFinishCallback(onPerfVsyncCallback, nullptr);
|
||||
}
|
||||
#endif
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user