Skip to content

Commit

Permalink
Queued realtime characters were being ignored when not idle
Browse files Browse the repository at this point in the history
  • Loading branch information
MitchBradley committed Jan 19, 2024
1 parent 674b0df commit ade2550
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions FluidNC/src/Channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@ void Channel::pin_event(uint32_t pinnum, bool active) {
Channel* Channel::pollLine(char* line) {
handle();
while (1) {
int ch;
if (line && _queue.size()) {
int ch = -1;
if (_queue.size()) {
ch = _queue.front();
_queue.pop();
} else {
} else if (line) {
ch = read();
}

Expand Down
4 changes: 2 additions & 2 deletions FluidNC/src/WebUI/WSChannel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ namespace WebUI {
return false;
}
char c;
while ((c = *data++) != '\0') {
_queue.push(c);
while (length--) {
_queue.push(*data++);
}
return true;
}
Expand Down

0 comments on commit ade2550

Please sign in to comment.