mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-09-14 15:16:40 +00:00
UITask::shutdown() busy-waits on buzzer.isPlaying() for up to 2.5s before powering off. On real hardware that's a real (if crude) wait; in the Emscripten sim it's a synchronous block on the browser's single JS/wasm thread, which freezes the whole page for the duration -- reported as the site "zacinanie się" (stuttering) whenever hibernate/shutdown triggers. Guards it with #ifdef SIM_PLATFORM, mirroring the identical pattern already used a few lines below for the low-battery pre-shutdown pause. Verified empirically (not just by reading the diff): measured real requestAnimationFrame throughput on meshcore-solo-site while triggering hibernate for real (Home -> Shutdown page -> Enter). Before: 135 frames in 3.5s (607ms max stall). After: 633 frames in the same window (110ms max) -- confirmed with a real stash/rebuild before-after control. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018iubftDmKNWmkNnhJRz8UH