Repository navigation
feat(cli): add input injection and file access commands for debug builds - #7873
Merged
Merged
Conversation
Add CLI commands that inject input on a running radio so UI changes can be checked on hardware (pair with a framebuffer grab): key <label> [ms] trim <label><+|-> [ms] touch <x> <y> [ms] [x2 y2] rotary <steps> Everything is behind CLI_INPUT_INJECT (CLI && DEBUG && !BOOT), so non-debug builds are unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Member
Collaborator
Author
|
Not the same scope is it ? This is to use real radio, not simu |
Member
|
sorry, missed that, ok, so input to live radio... nice! |
Member
|
All that is really missing is you need to be able to make it to send back screen captures, then it can actually properly start the drive the radio itself. Nice to finally see some work towards that goal we talked about this time last year of automatable testing 😆 |
Add lsl, fread, fwrite, fput, rm and mkdir behind CLI_FILE_ACCESS (CLI && DEBUG && !BOOT), so tools can read and write the SD card over the USB VCP. fput takes raw bytes after the command line (up to 4 KB, offset 0 truncates); fread replies in hex. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Add debug-only CLI commands so a running radio can be driven and inspected from tools (pair with a framebuffer grab via jlink):
Input injection (
CLI_INPUT_INJECT):SD card file access (
CLI_FILE_ACCESS):Both are behind
CLI && DEBUG && !BOOT, so non-debug builds are unchanged. In debug builds the CLI RX buffer grows from 256 B to ~4 KB to hold anfputblock.Tested on a TX16S MK3: random binary files of 100 B to 200 KB round-trip exactly, about 220 KB/s write and 28 KB/s read.
Known limit: the USB CDC TX ring (
usbd_cdc.cpp) duplicates bytes when a single reply is roughly 2 KB or more, sofreadreplies should stay at or below 1 KB. This is not changed here.It helps me on my local dev where I'm creating a setup allowing AI to check the result of its work on a real radio :)
🤖 Generated with Claude Code