-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
CircuitPython 8.X title-set ansi code sometimes ends up in stdin #6892
Comments
An easy mitigation for me was to simply create a bufferclear command and add it to the boot scripts, right after the serial connection occurs. Also, it IS in stdin, it's treated as text in the buffer, and I can move my cursor to it. |
You can now disable the status bar: #6847. For example, in boot.py: import supervisor
supervisor.status_bar.console = False
I don't think it is being sent incompletely, but the sending starts before the USB connection is fully up. This should be fixed. |
#6952 should fix this, on boards that have native USB. The status bar is not written out at all if, when the write starts, the serial connection is not available. On boards that have an on-board serial-to-USB converter chip, the USB status pins on that chip may not be connected to anything, which is often the case. In that case, there is no way to know if the host is connected via USB, so there may still be situations where the first part of the status-bar write is missed, and the rest appears in-line. We might consider disabling the status bar by default on such boards, or delaying its enabling by several seconds. (Re stdin: the status bar is written to the serial output like anything else, such as REPL output. Normally the escape code at the beginning would cause the terminal program to remove it from the what is displayed, but when the first part of the escape code is missed, it looks like "normal" output, and appears in the terminal window.) |
Ι do not have any boards that require serial-to-usb so I cannot test that, however I will test the pr artifacts on my beetle-c3 and pico and provide any findings (if any) on the pr thread.
You can read more about my fully non-blocking input implementation here Leaving the issue open till merge. |
Using artifact https://github.com/adafruit/circuitpython/actions/runs/3138352211 on raspberry_pi_pico |
I will re-test on RPi Pico now that it's merged. |
@bill88t what are you using as a terminal program? |
Kde Konsole. |
If you are wondering, yes it does support ansi escape. Also might I suggest a potential workaround? If the terminal is at a goodnough state to reply to that, surely it's ready for a title set |
A query could also appear as junk, since it's in-band just like the title sequence. Right now I am testing whether the USB connection is up. I don't send the title bar sequence at all if, at the beginning, the serial connection is not yet up. I am not sending the title sequence to |
That's the terminal program you're using, but what are you using to connect to /dev/ttyACM0, or whatever? E.g., are you using E.g., I am using |
I am using GNU/screen for that |
CircuitPython version
Code/REPL
Ljinux
Behavior
Description
Sometimes, when polling stdin, the console receives parts of the title-set ansi escape code sequence, circuitpython 8.x uses.
This means that at some point during the boot proccess, circuitpython decided to send the title-set, but sent it incompletely..
Additional information
The text was updated successfully, but these errors were encountered: