Repository navigation
Conversation
The full-image text path rendered both planes at one byte per pixel: about 47 KB for a 208x112 red tag, plus the payload. With the app running only ~45 KB of heap is left on a Flipper with official firmware 1.5.1, so malloc() failed and the device crashed. Render the text 16 rows at a time into 1-bit planes, as the Color 2.6 path already does, and encode them through tagtinker_encode_fn_payload(). Peak use drops to about 12 KB. The payload is unchanged: a host check over 1944 cases (sizes, texts, accent, invert, padding, compression) gives byte-identical results. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QYkmJ3RnCgGZEBKnfRJt5x
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.
Set Text: keep the text planes at 1 bit per pixel
Problem
The full-image text path renders both planes at one byte per pixel. For a
208x112 red tag that is ~47 KB, plus the encoded payload (~52 KB in all).
With the app running only ~45 KB of heap was left (momentum firmware),
so
malloc()failed and the Flipper crashed (out of memory).Change
Render the text 16 rows at a time into 1-bit planes, as the Color 2.6 path
already does, and encode them with
tagtinker_encode_fn_payload(). Peak usedrops to ~12 KB.
tx_render_color26_text_plane()now calls the same generichelper.
Tested
padding 0/10/20 %, Auto / Raw / RLE): payloads byte-identical to the old
code, ASan + UBSan clean.
longer crashes and the text is displayed.