Duet3D / DuetSoftwareFramework

Software framework for the next-generation Duet3D platform based on .NET
GNU General Public License v3.0
61 stars 28 forks source link

Marlin emulation not always returning command status. #172

Closed NNMavy closed 3 years ago

NNMavy commented 3 years ago

While investigating an issue with a TFT screen I discovered that the M20 and M503 commands do not return "ok" after executing. This resulted in the TFT waiting endlessly for the command to have ben executed.

So far I have identified M20 and M503 to be broken but I suspect more M commands in MCodes.cs will be broken when using a SBC and marlin emulation.

jaysuk commented 3 years ago

This when using a BTT TFT screen as they have recently been adding RRF support

NNMavy commented 3 years ago

This was with a BTT screen, however I can imagine other devices that rely on marlin mode will have a similar issue.

So far I have narrowed the issue down to this line of code. It seems that the IsLastCode flag is not set and as a result the marlin emulation is not working as expected.

chrishamm commented 3 years ago

I think I fixed some related problems in v3.3 and I do get the proper ok responses below M20 and M503 so I'll close this issue again. To be safe I added another test case to the DSF unit tests and they confirm that the IsLastCode flag is properly set.