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

Dear correcly with backspace #9

Open
lpatiny opened this issue Jun 28, 2022 · 0 comments
Open

Dear correcly with backspace #9

lpatiny opened this issue Jun 28, 2022 · 0 comments

Comments

@lpatiny
Copy link
Member

lpatiny commented Jun 28, 2022

When we hit the 'DEL' key in the serial mode it is actually appended to the string rather than remove the last character.

This could be improved in this part of the code:

if (inChar == 13 || inChar == 10) {
// this is a carriage return;
if (serialBufferPosition > 0) {
printResult(serialBuffer, &Serial);
}
serialBufferPosition = 0;
serialBuffer[0] = '\0';
} else {
if (serialBufferPosition < SERIAL_BUFFER_LENGTH) {
serialBuffer[serialBufferPosition] = inChar;

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

1 participant