Skip to content

Backspace characters are not rendered in the console #5603

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

Open
eric-wieser opened this issue Nov 17, 2016 · 2 comments
Open

Backspace characters are not rendered in the console #5603

eric-wieser opened this issue Nov 17, 2016 · 2 comments
Labels
Component: IDE The Arduino IDE feature request A request to make an enhancement (not a bug fix)

Comments

@eric-wieser
Copy link
Contributor

eric-wieser commented Nov 17, 2016

When working with the chip-kit extension for arduino, the pic32prog program is called to program the PIC. The code for this can be seen here to emit backspace characters to the console, to emulate a progress bar. This tool is configured using these lines

Unfortunately, the arduino console shows these characters as backspace symbols, rather than moving the document insertion point back to the start of the progress bar.

If this were changed in core, it would probably need to be here

Which of this are reasonable approaches to fixing this behaviour?

  • Use a full console-emulator inside the arduino IDE
  • Implement handling of \b and \r, and hope nothing else is really needed?
  • Modify picprog binary to produce \b-free output?
@per1234
Copy link
Collaborator

per1234 commented Oct 19, 2020

Implement handling of \b and \r, and hope nothing else is really needed?

\r support was added by #9954, but \b is still not supported.

@per1234 per1234 added Component: IDE The Arduino IDE feature request A request to make an enhancement (not a bug fix) labels Oct 19, 2020
@matthijskooijman
Copy link
Collaborator

The link in the original report now points to the wrong line, updated links are https://github.com/sergev/pic32prog/blob/41c472fe4f4e3c7a003fb17abfb3e8cda0fbcec2/pic32prog.c#L645-L646 and https://github.com/sergev/pic32prog/blob/41c472fe4f4e3c7a003fb17abfb3e8cda0fbcec2/pic32prog.c#L347

Note that the program will print a line of ., then use \b to move the cursor back to the first dot, and then overwrite each dot with # while the upload progresses. I'm actually a bit surprised about this, I would have expected a backspace character to actually erase the previous character, rather than just moving the cursor back, but maybe this is not how regular terminals work...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: IDE The Arduino IDE feature request A request to make an enhancement (not a bug fix)
Projects
None yet
Development

No branches or pull requests

3 participants