perf(ui): aumentar a 28 cuadros de alta densidad con interpolacion senoidal para eliminar saltos de refresco
This commit is contained in:
parent
3eae5061a4
commit
e211d4ad76
1 changed files with 8 additions and 5 deletions
|
|
@ -1377,10 +1377,13 @@ inline void animateSlideTransition(bool swipeLeft) {
|
||||||
|
|
||||||
spr.loadFont(DSEG7_Modern_BoldItalic_34); // Loaded ONCE before animation loop!
|
spr.loadFont(DSEG7_Modern_BoldItalic_34); // Loaded ONCE before animation loop!
|
||||||
|
|
||||||
const uint8_t FRAMES = 16;
|
const uint8_t FRAMES = 28;
|
||||||
// Cubic ease-out deceleration curve over 16 frames: smooth, visible and elegant
|
// 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] = {
|
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++) {
|
for (uint8_t f = 0; f < FRAMES; f++) {
|
||||||
|
|
@ -1420,8 +1423,8 @@ inline void animateSlideTransition(bool swipeLeft) {
|
||||||
spr.pushSprite(0, y_slice);
|
spr.pushSprite(0, y_slice);
|
||||||
}
|
}
|
||||||
|
|
||||||
yield(); // Feed watchdog and give Bluetooth scheduler CPU cycles
|
yield(); // Feed watchdog and let Bluetooth run smoothly on background core
|
||||||
delay(14); // Pacing for smooth, readable transition (~360ms total)
|
delay(7); // Ultra-smooth high density pacing (~330ms total)
|
||||||
}
|
}
|
||||||
|
|
||||||
spr.unloadFont(); // Unload font once at the end
|
spr.unloadFont(); // Unload font once at the end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue