summaryrefslogtreecommitdiff
path: root/src/tangara/ui/lvgl_task.cpp
AgeCommit message (Collapse)Author
2025-02-27Change UI thread interval from 0ms minimum to 16ms (reduces UI CPU).Tursiae
Prior to this change, the UI thread was consuming approx. 10-14% CPU in the idle state, and appeared to be running in an endless loop. After this change, the UI thread is measured at about 0.1% CPU. I'm not sure what the current consumption impact is, but it's gotta be a power saving, even if slim? Following manual testing with the device after flashing this change, the UI responsiveness and music playback does not appear to be negatively affected. The UI actions that were tested were: - Scrolling through items on the root menu - Scrolling through settings - Scrolling through All Tracks with long-press on the bottom of the scroll wheel (Page Down) on a device with ~20k songs - Repeatedly hitting 'next track' - Forcing a DB update, and scrolling through All Tracks while updating the database. The device was configured with the following settings when tested: - TTS enabled - Wired headphones - Bluetooth enabled but not connected - No DB auto-update - Playing music Prior to this change, the UI thread was consuming approx. 10-14% CPU in the idle state, and appeared to be running in an endless loop. On a stock (v1.2.2) build, `tasks` reported: ``` → tasks name core free stack run time IDLE1 1 1.0 KiB 99.6% IDLE0 0 1.1 KiB 86.5% ui any 10.1 KiB 13.7% console_repl 1 5.6 KiB 0.5% Tmr Svc any 1.4 KiB 0.0% audio_dec any 19.4 KiB 0.0% main 0 2.0 KiB 0.0% lvglDraw any 2.9 KiB 0.0% btController 0 2.1 KiB 0.0% esp_timer 0 3.4 KiB 0.0% BTC_TASK 1 2.6 KiB 0.0% worker_1 any 30.1 KiB 0.0% worker_3 any 5.7 KiB 0.0% worker_2 any 29.5 KiB 0.0% worker_0 any 25.7 KiB 0.0% BTU_TASK 1 3.2 KiB 0.0% hciT 1 1.5 KiB 0.0% ipc0 0 1.0 KiB 0.0% ipc1 1 1.0 KiB 0.0% audio_conv any 3.4 KiB 0.0% ``` Following this change, the UI thread decreased from 13% in idle to 0.1% usage, as reported by `tasks`: ``` → tasks name core free stack run time IDLE1 1 1.0 KiB 99.8% IDLE0 0 1.1 KiB 99.4% console_repl any 6.4 KiB 0.5% ui any 10.1 KiB 0.1% btController 0 2.1 KiB 0.0% Tmr Svc any 1.4 KiB 0.0% esp_timer 0 3.4 KiB 0.0% audio_dec any 19.4 KiB 0.0% ipc1 1 1.0 KiB 0.0% ipc0 0 1.0 KiB 0.0% hciT 1 1.5 KiB 0.0% BTU_TASK 1 3.2 KiB 0.0% worker_3 any 20.7 KiB 0.0% worker_2 any 29.4 KiB 0.0% BTC_TASK 1 2.5 KiB 0.0% worker_1 any 30.1 KiB 0.0% worker_0 any 5.7 KiB 0.0% lvglDraw any 2.9 KiB 0.0% main 0 2.0 KiB 0.0% audio_conv any 3.4 KiB 0.0% ```
2024-08-28Move the UI task main loop info iramjacqueline
2024-06-28Fix some issues with the splash screenjacqueline
- fix a use-after-free involving the alerts container that was happening when showing the first screen - fix some issues where the splash screen wouldn't come up as early as it needs to when another bootup task was making heavy use of the spi bus
2024-06-28show a message if the sd card is unmountedjacqueline
2024-06-12WIP fix issues introduced by lvgl version bumpjacqueline
2024-05-29Start on TTS support by logging the data that will become TTS linesjacqueline
Includes some misc cleanup of haptic double-triggering (or non-triggering), since those cases all end up being TTS event double-reporting, which to me crosses the threshold from "annoying" to "usability issue"
2024-05-02move driver includes into a subdir as welljacqueline
2024-05-02start moving include files into subdirsjacqueline
2024-05-02WIP merge cyclically dependent components into one big componentjacqueline