From e211d4ad76a4a056987356fbeb4a7e724c04bc45 Mon Sep 17 00:00:00 2001 From: Sebastian Nieto Date: Mon, 21 Sep 2026 23:59:08 -0300 Subject: [PATCH] perf(ui): aumentar a 28 cuadros de alta densidad con interpolacion senoidal para eliminar saltos de refresco --- sketch/obd2_gauge/meter.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sketch/obd2_gauge/meter.h b/sketch/obd2_gauge/meter.h index 8d1afae..7c8f5ac 100644 --- a/sketch/obd2_gauge/meter.h +++ b/sketch/obd2_gauge/meter.h @@ -1377,10 +1377,13 @@ inline void animateSlideTransition(bool swipeLeft) { spr.loadFont(DSEG7_Modern_BoldItalic_34); // Loaded ONCE before animation loop! - const uint8_t FRAMES = 16; - // Cubic ease-out deceleration curve over 16 frames: smooth, visible and elegant + const uint8_t FRAMES = 28; + // High-density sine ease-out deceleration over 28 frames: + // Ultra-fine 10-18px initial steps smoothly tapering to 1-3px for zero visible refresh chop const int16_t step_shifts[FRAMES] = { - 28, 62, 102, 144, 184, 218, 246, 268, 284, 296, 305, 311, 315, 318, 319, 320 + 18, 36, 54, 71, 89, 106, 122, 139, 155, 170, + 185, 200, 213, 226, 239, 250, 261, 271, 280, 288, + 296, 302, 307, 312, 315, 318, 319, 320 }; for (uint8_t f = 0; f < FRAMES; f++) { @@ -1420,8 +1423,8 @@ inline void animateSlideTransition(bool swipeLeft) { spr.pushSprite(0, y_slice); } - yield(); // Feed watchdog and give Bluetooth scheduler CPU cycles - delay(14); // Pacing for smooth, readable transition (~360ms total) + yield(); // Feed watchdog and let Bluetooth run smoothly on background core + delay(7); // Ultra-smooth high density pacing (~330ms total) } spr.unloadFont(); // Unload font once at the end