You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
shell_putc() calls both shell_writer() and obhandle->shell_bwriter() if both are not 0. This results in chars being printed twice, once by each writer. There is no way to avoid this condition when using buffered output, since shell_writer() is required by shell_init() and there's no way to undefined it.
Steps to reproduce:
--Initialize the shell as in the Shell_Basic example
--Add a buffered writer, something like:
void shell_buffered_writer(char* buffer, uint8_t count)
{
// If we can write to a client
if(client==true && client.connected())
{
client.write(buffer, count);
}
}
--Write enough output with shell_print() to trigger a buffered write
--Observe that the output is written twice
Proposed solution:
Rework the if statements in shell_putc() so that only one writer is called
The text was updated successfully, but these errors were encountered:
joemcool
added a commit
to joemcool/Shell
that referenced
this issue
Nov 13, 2021
shell_putc()
calls bothshell_writer(
) andobhandle->shell_bwriter()
if both are not 0. This results in chars being printed twice, once by each writer. There is no way to avoid this condition when using buffered output, sinceshell_writer()
is required byshell_init()
and there's no way to undefined it.Steps to reproduce:
--Initialize the shell as in the Shell_Basic example
--Add a buffered writer, something like:
--Write enough output with
shell_print()
to trigger a buffered write--Observe that the output is written twice
Proposed solution:
Rework the
if
statements inshell_putc()
so that only one writer is calledThe text was updated successfully, but these errors were encountered: