Driveline: write labels only on change (idle 9.7 fps -> 0); perf: panel vsync counter + esp_timer reporting
Firmware / build (push) Successful in 4m2s

This commit is contained in:
2026-09-27 16:57:06 +02:00
parent 94c70a572b
commit 6593abe9f5
8 changed files with 128 additions and 33 deletions
+16 -2
View File
@@ -19,7 +19,11 @@
*
* PERF line (CSV, greppable like CANRAW):
* PERF,<ts_ms>,<fps>,<avg_ms>,<max_ms>,<kpx/frame>,<flush_ms/s>,
* <lvgl_idle%>,<idle0%>,<idle1%>,<int_free>,<int_largest>,<psram_free>
* <lvgl_idle%>,<idle0%>,<idle1%>,<int_free>,<int_largest>,<psram_free>,
* <vsync/s>,<vsync_gap_max_us>
* vsync/s is the panel's own refresh rate (constant when healthy);
* vsync_gap_max_us is the longest interval between two refreshes in the
* window - a DMA underrun/restart stretches it.
*/
#pragma once
@@ -37,10 +41,20 @@ void onFrame(uint32_t time_ms, uint32_t px);
/** Hook for the flush callback - one pixel copy into the framebuffer. */
void onFlush(uint32_t time_us, uint32_t px);
/**
* Hook for the RGB panel's refresh-finished (vsync) interrupt. ISR context:
* counts frames the panel actually completed and the longest gap between two,
* which is where a DMA underrun / restart (flicker, dots) shows up.
*/
void onVsync();
/** Console line beginning with "perf". */
bool handleCommand(const char* line);
/** Periodic reporting. Call from loop(). */
/**
* Kept for compatibility; periodic reporting now runs from an esp_timer so it
* survives a blocked loop() (the OTA job). Safe to call, does nothing.
*/
void tick();
} // namespace PerfMon