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

Requesting support for 'data' serial console #3

Open
DeviousFusion opened this issue Feb 11, 2022 · 3 comments
Open

Requesting support for 'data' serial console #3

DeviousFusion opened this issue Feb 11, 2022 · 3 comments

Comments

@DeviousFusion
Copy link

Hey @s-light ! Thank you for this library. I have been using with Rpi pico and it works great. I was hoping you could add support for the second serial console that usb_cdc provides: usb_cdc.data. This allows me to send serial commands on data console, while keep the default console for debugging. Currently I am using this as a workaround:

import usb_cdc
import nonblocking_serialinput as nb_serialin

my_input = nb_serialin.NonBlockingSerialInput(serial=usb_cdc.data)

But the above requires me to import usb_cdc. If this is the way you envisioned then we can close the issue request, but I feel the user shouldn't have to re-import usb_cdc

@s-light
Copy link
Owner

s-light commented Feb 11, 2022

Hello @DeviousFusion great its working for you.
and thanks for this request!

yeah that is the way i thought about this...

and the only reason i have to import usb_cdc in the library is to have a default serial to use...

i could add a second class that just defaults to the data channel..
and maybe later refactor both defaults out of the main into a extra file - this way it would be possible to use the library with other implementations.. (Blinka?!) - as long as the connected, in_waiting and read functions are available..


i think i will do this refactor next week - feel free to ping if i forget about it.. ;-)

@DeviousFusion
Copy link
Author

I like the idea of the refactor such that both consoles have their own classes. Limits cross-chatter and allows for better integration with other libraries as you mentioned. Again no rush.

s-light added a commit that referenced this issue Feb 11, 2022
@s-light
Copy link
Owner

s-light commented Feb 11, 2022

i just did the refactoring -
untested on the quick ....

fell free to test and report if it is working or i have done something stupid in the hurry... ;-)

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