Skip to content

elrs-bind: store 20 bind phrases and scroll the history list - #1

Open
raphaelhunziker1202-stack wants to merge 1 commit into
CapnBry:bindphrasefrom
raphaelhunziker1202-stack:bindphrase-history-scroll
Open

elrs-bind: store 20 bind phrases and scroll the history list#1
raphaelhunziker1202-stack wants to merge 1 commit into
CapnBry:bindphrasefrom
raphaelhunziker1202-stack:bindphrase-history-scroll

Conversation

@raphaelhunziker1202-stack

@raphaelhunziker1202-stack raphaelhunziker1202-stack commented Aug 26, 2026

Copy link
Copy Markdown

The bind phrase history is capped at 5 entries, and the cap is on the stored data rather than the display:

while #History.vals > History.MAX do
  table.remove(History.vals)
end

Adding a sixth phrase silently drops the oldest one from history.txt. Anyone running more than five aircraft loses phrases that are still in use and has to type them again.

Change

  • New History.PAGE = 5 — the number of rows actually rendered. The on-screen footprint no longer depends on how much is stored, which is what made the low cap necessary in the first place.
  • History.MAX 5 → 50 (stored entries)
  • histOffset scrolls a window over the list; history_text / history_press / history_remove resolve through it
  • Up/Down buttons move one page at a time, shown only when the history is longer than one page, disabled at the ends
  • A position label shows 1-5 / 50
  • Adding a phrase resets the offset so the new top entry is visible
  • history_clampOffset() keeps the window in bounds after a delete

History.load() already reads 64 * History.MAX bytes, which covers the new limit (bind phrases are capped at 52 characters, so 50 x 53 = 2650 < 3200).

No change to the row layout, the X delete button, or any CRSF handling.

Based on the bindphrase branch since it builds on the elrs-bind tool from ExpressLRS#10.

Testing: written against the LVGL patterns already used in this repo (callback text / visible / active). Happy to adjust the nav row placement or button labels.

🤖 Generated with Claude Code

@raphaelhunziker1202-stack raphaelhunziker1202-stack changed the title elrs-bind: store 20 bind phrases and scroll the history list elrs-bind: store 50 bind phrases and scroll the history list Aug 26, 2026
@raphaelhunziker1202-stack raphaelhunziker1202-stack changed the title elrs-bind: store 50 bind phrases and scroll the history list elrs-bind: store 100 bind phrases and scroll the history list Aug 26, 2026
The history was capped at 5 entries, and the cap was on the stored data
rather than the display: adding a sixth phrase silently dropped the
oldest one from history.txt. Anyone managing a larger fleet loses
phrases that are still in use and has to retype them.

Show the history through a scrolling window of History.PAGE (5) rows so
the on-screen footprint no longer depends on how much is stored, which
is what forced the low cap in the first place. With that decoupled,
raise the stored limit to 20. Up/Down buttons move the window a page at
a time and are only shown when the history is longer than one page. A
label shows the current position.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@raphaelhunziker1202-stack raphaelhunziker1202-stack changed the title elrs-bind: store 100 bind phrases and scroll the history list elrs-bind: store 20 bind phrases and scroll the history list Aug 26, 2026
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