Skip to content

fix(bw212): SD card image viewer may show corrupted image#7416

Open
philmoz wants to merge 1 commit into
mainfrom
philmoz/fix-bw-sd-image-view
Open

fix(bw212): SD card image viewer may show corrupted image#7416
philmoz wants to merge 1 commit into
mainfrom
philmoz/fix-bw-sd-image-view

Conversation

@philmoz
Copy link
Copy Markdown
Collaborator

@philmoz philmoz commented Jun 1, 2026

On B&W radios with 212x64 LCD size, the SD card file viewer can preview the image for some BMP files.

Only BMP files that can be used as model images are shown (size <= 64x32 pixels).

If the BMP bitmap is not suitable as a model image then the radio should show the EdgeTX logo instead, however the code instead showed a garbage image.

Applies to 2.11, 2.12 and 3.0. Bug is also present in 2.10 and possibly earlier versions.

Summary by CodeRabbit

  • Refactor
    • Improved internal bitmap loading code organization for better maintainability and code reusability.

@philmoz philmoz added this to the 2.11.7 milestone Jun 1, 2026
@philmoz philmoz added bug 🪲 Something isn't working UX-UI Related to user experience (UX) or user interface (UI) behaviour B&W Related generally to black and white LCD radios labels Jun 1, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 1, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

This PR extracts the RLE bitmap decompression logic into a reusable loadLogoBitmap() helper function. The function is declared in the GUI header, implemented in bmp.cpp to decompose logo_taranis, and called in two locations: the error path of loadModelBitmap() and the bitmap display logic in radio_sdmanager.cpp.

Changes

Logo Bitmap Loading

Layer / File(s) Summary
Logo bitmap loading helper extraction and usage
radio/src/gui/212x64/gui.h, radio/src/gui/212x64/bmp.cpp, radio/src/gui/common/stdlcd/radio_sdmanager.cpp
loadLogoBitmap() is declared and implemented to encapsulate RLE bitmap decompression from logo_taranis, replacing inline logic in loadModelBitmap() error handling and bitmap display initialization in radio_sdmanager.

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the bug context and expected behavior but does not follow the repository template, missing the required 'Fixes #' issue reference and 'Summary of changes' section headers. Add the issue reference (Fixes #7416) and restructure content under 'Summary of changes' as specified in the template.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title directly addresses the main change: fixing corrupted image display in the SD card image viewer on B&W 212x64 LCD radios.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch philmoz/fix-bw-sd-image-view

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pfeerick pfeerick changed the title fix(bw): SD card image viewer may show corrupted image fix(bw212): SD card image viewer may show corrupted image Jun 3, 2026
@pfeerick pfeerick added backport/2.11 To be backported to a 2.11 release also. backport/2.12 To be backported to a 2.12 release also. labels Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B&W Related generally to black and white LCD radios backport/2.11 To be backported to a 2.11 release also. backport/2.12 To be backported to a 2.12 release also. bug 🪲 Something isn't working UX-UI Related to user experience (UX) or user interface (UI) behaviour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants