Fix and improve G-code queue (#21122)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
@@ -1613,7 +1613,7 @@ void wifi_rcv_handle() {
|
||||
if (wifiTransError.flag != 0x1) WIFI_IO1_RESET();
|
||||
getDataF = 1;
|
||||
}
|
||||
if (need_ok_later && (queue.length < BUFSIZE)) {
|
||||
if (need_ok_later && !queue.ring_buffer.full()) {
|
||||
need_ok_later = false;
|
||||
send_to_wifi((uint8_t *)"ok\r\n", strlen("ok\r\n"));
|
||||
}
|
||||
@@ -1772,7 +1772,7 @@ void get_wifi_commands() {
|
||||
static int wifi_read_count = 0;
|
||||
|
||||
if (espGcodeFifo.wait_tick > 5) {
|
||||
while ((queue.length < BUFSIZE) && (espGcodeFifo.r != espGcodeFifo.w)) {
|
||||
while (!queue.ring_buffer.full() && (espGcodeFifo.r != espGcodeFifo.w)) {
|
||||
|
||||
espGcodeFifo.wait_tick = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user