Closed
Conversation
The ESP32 is too busy writing flash to respond to /ota/status poll requests, so _autoOtaProgress often stays at a low value (e.g. 25%) even when the download completes successfully. The previous >= 90% threshold guard then blocked waitForReboot(), leaving the UI frozen. Replace the progress threshold with an _otaInstallStarted flag set after the server confirms the OTA task has begun. Any 404/network error after install is confirmed now correctly triggers waitForReboot(), regardless of the last polled progress value.
platformio.ini (esp32c3 env): - Switch to partitions_4mb_c3.csv (1.875 MB OTA partitions) - build_unflags: strip LOAD_GFXFF and SMOOTH_FONT — GFX free fonts and smooth VLW font renderer are compiled in by default but never used - Explicit lib_deps without TFT_eWidget (dead code for C3) partitions_4mb_c3.csv (new): - app0/app1: 0x1E0000 (1.875 MB) each, up from 1.75 MB - SPIFFS: 0x30000 (192 KB), reduced from 448 KB — SPIFFS unused in BambuHelper - Result: 65 KB → 733 KB headroom - Note: partition table change requires USB re-flash; OTA updates thereafter src/main.cpp, src/display_ui.cpp: - USB CDC startup delay and Serial.flush() removal (previously unstaged)
Replace TFT_eSPI with LovyanGFX across the entire display stack. Board-specific configs (S3, CYD, C3) are C++ classes in display_ui.cpp. SPI pins and driver settings move from build_flags into the class configs, simplifying platformio.ini significantly. The C3 no longer needs the SPI patch script. Key changes: - Three LGFX board classes: LGFX_S3 (ST7789), LGFX_CYD (ILI9342), LGFX_C3 (ST7789) - fillArc replaces drawSmoothArc in gauge rendering; +90deg angle offset matches original gap-at-bottom orientation - alphaBlend565() helper replaces tft.alphaBlend() (not a member in LGFX) - drawArc (outline) replaces drawSmoothArc in animation code - S3 requires invertDisplay(true) at runtime for correct colors - Backlight handled via BACKLIGHT_PIN + analogWrite (unchanged) - config.h: BACKLIGHT_PIN guard added (was hardcoded to TFT_BL)
Replace LovyanGFX built-in bitmap fonts (1/2/4) with smooth anti-aliased VLW fonts generated from Inter Regular at 10/14/19pt. Font 7 (7-segment) is kept for clock displays. - Add Python script to generate VLW PROGMEM headers from TTF - Create font abstraction layer (fonts.h) with setFont() helper - Migrate all setTextFont() calls across 5 display files - All three targets build (~70% flash with LovyanGFX)
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.
Summary
fonts.habstraction layer withsetFont()helper — centralizes all font selectionscripts/generate_vlw_fonts.py) for reproducible font builds from TTF sourceDepends on #37 (LovyanGFX migration) — rebase onto main after that merges.
Flash usage (on top of LovyanGFX)
Test plan