Skip to content

Port upstream rendering optimizations and MemAvailable fix#3

Closed
cafedomingo wants to merge 4 commits intomainfrom
dietpi-update-badges
Closed

Port upstream rendering optimizations and MemAvailable fix#3
cafedomingo wants to merge 4 commits intomainfrom
dietpi-update-badges

Conversation

@cafedomingo
Copy link
Copy Markdown
Owner

Summary

  • Ports two useful but unmerged PRs from the upstream UCTRONICS repo
  • Rendering optimization (from UCTRONICS/SKU_RM0004#27 by @slyglif): buffer character pixels and use burst I2C transfer instead of pixel-by-pixel writes, remove redundant SYNC, fix off-by-one clipping in lcd_fill_rectangle, fix wrong dimension calc in lcd_draw_image
  • MemAvailable fix (from UCTRONICS/SKU_RM0004#17 by @mobejm): use MemAvailable instead of MemFree for RAM reporting — includes reclaimable cache/buffers for accurate available memory

Test plan

  • make clean && make builds without warnings
  • Display renders correctly (text, bars, badges)
  • RAM % reflects MemAvailable (should decrease vs previous MemFree-based value)

🤖 Generated with Claude Code

cafedomingo and others added 4 commits February 23, 2026 14:33
Read cached DietPi update data from /run/dietpi/ to show two
indicators in the upper-right header area:

- Green/red dot (hostname row): DietPi core update status
- ^N count (IP row): APT upgradable package count, yellow <10, red >=10

No new scripts or timers — reads files DietPi already maintains.
On non-DietPi systems, badges are hidden (files don't exist).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Buffer character pixels in memory and use burst transfer instead of
pushing one pixel at a time. Remove redundant SYNC_REG call from
lcd_write_string. Fix off-by-one clipping in lcd_fill_rectangle and
wrong dimension calculation in lcd_draw_image.

Adapted from UCTRONICS#27

Co-authored-by: slyglif <10196904+slyglif@users.noreply.github.com>
MemAvailable includes reclaimable cache and buffers, giving a more
accurate picture of actually available memory.

Adapted from UCTRONICS#17

Co-authored-by: mobejm <4407468+mobejm@users.noreply.github.com>
@cafedomingo cafedomingo deleted the dietpi-update-badges branch February 23, 2026 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant