Closed fireup924 closed 8 months ago
I assume this is with the RP2040 driver. The issue seems to be that the code for flushing the RX buffer that also attempts to empty the RX FIFO upsets something. Commenting out the FIFO flushing part resolves the issue. I guess I'll have to figure out how to empty the FIFO without causing side-effects.
Yes, it's on a RP2040. I wasn't sure if it's was only RP2040 so I tested it on ESP32 and Teensy4 and they don't have the same issue.
Thank you for the fix. It works now without having to touch the core code in protocol.c
It works now without having to touch the core code in protocol.c
I spent a lot of time fixing jog cancel that intermittently failed with the legacy code inherited from Grbl, so I suspected the issue was somewhere else. What is odd is that somehow spurious characters get inserted in the input buffer when attempting to flush the RX FIFO. The solution was not to flush it since characters received after the jog cancel command are not problematic and should be kept anyway...
When using IOSender and communicating via Ethernet-Uart module, the Keyboard jog does not work and gives a
"G-code words consist of a letter and a value. Letter was not found."
error.I traced it down to this section of protocol.c on line 890
hal.stream.cancel_read_buffer();
commenting this line out and addingsystem_set_exec_state_flag(EXEC_MOTION_CANCEL);
seem to fix the problem.I'm not sure if this is the right fix for this? I seems the keyboard jog command for IOSender is sending a 0x85 and a $J= in the same line and cause the hal.stream.cancel_read_buffer() to trim some of the Jog string...