Board library: fix 1 px offset in mirrored rotations
The panel's row mirror (MY) puts the image one line off, which left a stray line at the edge when starting at 270 degrees. setRotation() now sets a 1 px gap on the axis MY mirrors, and scr_lvgl_init() clears the whole GRAM at rotation 0 so no random power-on pixels can show. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c9fb70ad10
commit
c22b98de76
2 files changed
+25
-3
No files matched your search
@@ -81,6 +81,7 @@ Display color format is `RGB565_SWAPPED` (ST77916 byte order, set in `lv_conf.h`
|
||||
| `tools` | `gif_to_360.py` — converts GIFs to 360×360 for the device (Pillow; scale to cover + center crop, keeps frame timing) |
|
||||
| `shared` | **Shared code for all JC3636W518 projects:** `jc3636w518.ini` (PlatformIO base config), `include/lv_conf.h` (LVGL 9.6), `lib/JC3636W518` (board library). See its `README.md` |
|
||||
| `12-OBD-Speed` | **The new program — working in the car (2026-10-23):** speed from the ELM327 over BLE as big number + arc gauge on a GIF background, battery-voltage arc in the bottom gap, idle/screen-off mode (both **verified by the user**); swipe left for the adapter menu (scan, select → remembered in NVS, auto-reconnect every 3 s), again for settings (rotation, idle/screen-off timeout), again for the background (GIF from SD `/gifs` copied into an 11.9 MB raw flash partition, own `partitions.csv`). See its `README.md` |
|
||||
| `13-Dash-Mount` | **3D-printed dashboard holder** (OpenSCAD, 2026-10-23, not yet printed): snap-in cup with lip over the bezel + USB-C opening on the side, detent tilt hinge (36 face teeth = 10° steps, M3×20 bolt + captive nut + printed knob), flat foot for VHB tape. ASA. User's choices: adhesive base, detent hinge, M3, cable exits sideways, only a USB-C opening needed. OpenSCAD is installed (`C:\Program Files\OpenSCAD\openscad.exe`, use from bash for `-D part="..."` quoting). See its `README.md` |
|
||||
| `10-GIF-Tests` | **GIF playback experiments** (was `10-OBD-Display-2024`): `display_gif_embedded`, `display_gif_sd`, `assets/gifs`. The 2024 bridge/ELMulator/WiFi speed sketch, the broken LVGL 9 archive and the BLE scanner tool (`11-BLE-Scanner`: on-screen scan, GATT listing, ELM test, LittleFS log) were removed 2026-10-23 — all in git history |
|
||||
| `3-Specification` | Spec sheet (factory firmware features, interface photo) |
|
||||
| `4-Chip manual` | ESP32-S3R8 datasheet, PCM5100A datasheet |
|
||||
@@ -118,6 +119,7 @@ AliExpress "ELM327 Mini V2.1 Bluetooth OBD **Dual Mode** 5.1" — dual mode = Bl
|
||||
Port notes: `lib_deps = lvgl/lvgl@9.6.0` (takes priority over the vendor lvgl 8 in `lib_extra_dirs`); `lv_conf.h` generated from the 9.6 template (CLIB malloc, refresh 15 ms, GIF on, examples off); in 9.6 public headers live in `include/lvgl/` and `LV_COLOR_DEPTH` is deprecated → `LV_COLOR_FORMAT_DEFAULT` (RGB565); no LV_COLOR_16_SWAP → `lv_draw_rgb565_swap()` in the flush cb; no LV_TICK_CUSTOM → `lv_tick_set_cb(millis)`; no `monitor_cb` → display events `LV_EVENT_REFR_START/RENDER_START/REFR_READY`; images are `lv_image_dsc_t` with `LV_IMAGE_HEADER_MAGIC`. `lv_gif_set_color_format()` switches the GIF buffer format (used, see below).
|
||||
- **LVGL 9 tuning** (display_gif_embedded, CPU at full 23.8 fps): start 86 % → GIF in display color format 66 % → render `RGB565_SWAPPED` (no swap pass) 60 % → QSPI 80 MHz 55 % → IRAM for hot LVGL code 53 %. No effect: `LV_GIF_CACHE_DECODE_DATA` (not used anywhere in 9.6), 120-row buffers. AnimatedGIF "turbo" mode can't be used: it only outputs in COOKED draw mode, LVGL uses RAW.
|
||||
- **All JC3636W518 LVGL projects now use LVGL 9.6.0 + the shared library** (10-GIF-Tests/*, 12-OBD-Speed). SD drive `A:` = `LV_USE_FS_STDIO` on `/sdcard/`.
|
||||
- **1 px offset with the panel's row mirror (MY)**: at 270° one edge line (near the USB port) showed random pixels at boot, then the far edge of the image once GRAM was cleared. So the image lands one line off when MY is set. Fix **verified by the user** (2026-10-24): `setRotation()` sets a 1 px gap on the axis MY mirrors (rot 3: `setGapX(1)`, rot 2: `setGapY(1)` (assumed, not yet seen), rot 1 uses only MX: no gap). `scr_lvgl_init()` also clears GRAM to black at rotation 0 before the backlight comes on.
|
||||
- 80 MHz QSPI and RGB565_SWAPPED rendering: **visually confirmed OK by the user** (colors correct, no glitches).
|
||||
- Display is round: corners of the 360×360 framebuffer are not visible — design UI within a 360 px circle.
|
||||
- Compiling a 13.9 MB GIF into the firmware will not fit "Huge APP" (3 MB); large media should live on SD (or in a custom partition).
|
||||
|
||||
Reference in new issue
Block a user