ESP3D
ESP3D copied to clipboard
GcodeHost Implementation
Adds logic to ignore post command and full line comments whilst parsing Gcode from SD or FS through GcodeHost::readNextCommand(), as requested in #785.
If implemented, this renders the function GcodeHost::isCommand() redundant, as all it does is verify that _currentCommand isn't a full line comment, and trims any trailing comments from it.
This approach should reduce memory usage, as comments won't be written into _currentCommand to begin with. May also improve performance, as GcodeHost::readNextCommand() should only set _currentCommand to usable commands. (No extra calls required in the case of full line comments) #
Apologies for the messy commits, but should be understandable.
Thank you, I should be able to review the PR today
the GcodeHost::isCommand() is now indeed a duplication but I think it can now be used to test if it is Host command (e.g: @pause) vs GCODE
Got it, makes sense. Since I'm continuing to work on gcode hosting, this push isn't worth it as is, I'll convert it to a draft and update it.
Features added in this push so far:
- Checksum and line numbering
- Pause and resume w/ M0 and M108 commands
- Abort w/ M112 command
Still need to add line resend - ~~If anyone knows where I can get some examples of error messages for missed lines etc please let me know~~
-also fixed ESP701 response message
I did some comments - I did not finished to read all yet but I think there is confusion between:|
- GCODE commands to be sent to host
- GCODE commands and Command to be interpreted by Host
- GCODE commands to be sent to printer FW
Currently @ commands haven't been implemented. I'm not too familiar with the ESP commands yet, but they appear to function properly, for instance ESP111 prints the IP address in the webui terminal, I'll try and get a screen recording of a test up.
https://user-images.githubusercontent.com/26628667/180682955-90253256-b7ef-4c70-9294-99fba61b68ca.mp4
Did you read my comments in code?
Hi @jamespearson04, awesome work, what is the status of your branch? Is the feature working? What needs to be done @luc-github for this PR to get merged? Thanks a lot for the hard work.
need test all gcode provided by Marlin, check which gcode provide ack and which provide data, test each state: processing/busy/heating/error/ack/out of filament/ etc.. and handle accordingly
also handle a possible user commands like @ pause and @ continue
if ok, make all these parameters as variable according FW: Marlin/Repetier/smoothieware
current pr is just at the early beginning, this is not simple task if handled properly
This feature is actually a project by itself
Thanks Luc for the detailed explanation. I really like the project, if I find time I will look into this.
sure, every contribution is welcome ^_^