Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ascii output mode #18

Open
jose1711 opened this issue Feb 21, 2023 · 1 comment
Open

ascii output mode #18

jose1711 opened this issue Feb 21, 2023 · 1 comment

Comments

@jose1711
Copy link

Could you please add an output mode that would interpret the 7-bit values as ASCII characters and discard the rest? That means instead of:

Reading 64-byte input report 0, 250 msec timeout...read 64 bytes:
 04 00 00 48 65 6C 6C 6F 20 77 6F 72 6C 64 21 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

one would see

Hello world!

I know one could pipe the output to perl or awk to achieve this but having it integrated with the program would be really handy.

@todbot
Copy link
Owner

todbot commented Mar 23, 2023

As a workaround, you could try using xxd like:

% echo "04 00 00 48 65 6C 6C 6F 20 77 6F 72 6C 64 21" | xxd -r
Hello world!%

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

No branches or pull requests

2 participants