feat(ui-lvgl): charts with a value axis, grid and a finger's readout

Chart.h draws Diagnostics > History, the noise sweep and the trail's height
profile: round values up the left, labels along the bottom, a solid fill
(no transparency) and, under a finger, the sample's value and when / where.
Sim: sim_open("histdemo") / ("profdemo") fill them with made-up data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-10-06 10:22:44 +02:00
co-authored by Claude Opus 5.5
parent 1f2cb301e6
commit ab767e7ae1
5 changed files with 429 additions and 158 deletions
+2 -2
View File
@@ -977,7 +977,7 @@ void UITask::navToolsPopup() {
_nav_trail_lbl = label(list, "", THEME_FONT_SMALL, theme::TEXT);
profileview::s_prof = trailprofile::Sampler(); // its height profile, as it is now
profileview::s_prof.feedAll(_core->trail.store());
profileChart(list, 72);
profileChart(list, 120);
lv_obj_t* r = buttonBar(list);
_nav_trail_btn = toolButton(r, "", navmap::TL_TRAIL_TOGGLE, true);
toolButton(r, LV_SYMBOL_SAVE " Save", navmap::TL_TRAIL_SAVE, false);
@@ -1251,7 +1251,7 @@ void UITask::savedTrailPopup(int idx) {
if (ok) snprintf(info, sizeof(info), "%s - %s - %d points", dist, dur, pts);
else snprintf(info, sizeof(info), "Can't read this file");
label(panel, info, THEME_FONT_BODY, theme::TEXT);
if (ok) profileChart(panel, 60);
if (ok) profileChart(panel, 104);
if (!_core->trail.store().empty())
label(panel, "Loading replaces the trail on the map.", THEME_FONT_SMALL, theme::TEXT_MUTED);
lv_obj_t* r = buttonBar(panel);