Repository navigation
Climb power bar, hand-controller emulator, crisper fonts - #131
Open
PaulDWhite wants to merge 2 commits into
Open
PaulDWhite wants to merge 2 commits into
PaulDWhite wants to merge 2 commits into
Conversation
Climb efficiency (#57): a thin power bar under the kW readout. - Pink tick: level-flight power, learned live from barometer altitude and pack power (recency-weighted, slope-corrected). Small brackets around it shrink as the estimate firms up. - Green band: most efficient sustainable climb power (within 5% of the best climb per kW), from w = s(P-L)(1-q(P-L)) fitted to the flight. - Yellow / red: power that, if held, would reach a warning / critical temperature within 5 minutes (or before 15% SOC). Motor and ESC use a live first-order thermal fit; battery cells and BMS parts use a pack-size-scaled heating model. Limits use the existing monitor thresholds. - Nothing is shown until the current flight has enough data. - Everything runs on the ESP32 from this flight's data; fleet logs were used only offline to tune the priors. Hand-controller emulator (tools/hc_emulator): the real LVGL main screen built natively, driven from a browser dashboard with a flight simulator and OpenPPG app CSV log replay. Includes the offline analysis scripts used to score the estimator against real flights. Display: - Montserrat regenerated with strong autohinting (tools/fonts), so small glyph stems land on whole pixels. Built-in LVGL fonts disabled. - Dark mode: black text on yellow temperature tiles; SOC bar uses the normal yellow. Sensor names moved from simple_monitor.cpp to sensor_names.cpp so the emulator and screenshot tests show the controller's real alert labels.
PaulDWhite
marked this pull request as ready for review
September 26, 2026 20:35
Brings in LVGL 9.6.0 (#136), the patch bumps (#135) and the ESP-IDF time shim (5b64992). - Fonts: reorder the seven montserrat_hinted_* lv_font_t initializers (dsc/fallback/user_data first), as LVGL 9.6 moved those fields and C++ needs declaration order. Same change master made to roboto_mono_16.c. tools/fonts/gen_hinted_fonts.py still emits the old order. - main.cpp: the two new millis() calls use timeMillis(), like the rest of master. - Screenshot references regenerated from the merged tree. 33 of 34 are byte-identical to this branch's; main_armed_cruising_dark changes by 184 px from master's dark-mode cruise icon fix (#130). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #57 (climb rate to power ratio).
Climb power bar
A thin bar under the kW readout (0–16 kW) that shows where to sit on the throttle for an efficient climb. It has no number readout.
monitor_config.hwarning and critical thresholds.Hand-controller emulator (
tools/hc_emulator)hc_emulator), plus the estimator and thermal model on their own (climb_eff_replay).server.py) with a flight simulator and OpenPPG app CSV log replay, including full-length real flights.analysis/holds the offline scripts used to build ground truth from real logs and score the estimator against it.See
tools/hc_emulator/README.md.Display fixes
tools/fonts/gen_hinted_fonts.py), so small glyph stems (e.g. M, m) land on whole pixels. Built-in LVGL fonts are disabled; flash use is 34.8%.simple_monitor.cpptosensor_names.cpp(no string changes), so the emulator and screenshot tests show the controller's real alert labels (e.g.MC-FT-H).Testing
test_climb_efficiency,test_thermal_headroom.OpenPPG-CESP32S3-CAN-SP140; cpplint is clean.