Closed jamespearson04 closed 1 year ago
Goals going forward are:
@jamespearson04 I have finished UI - so now I will focus on integration of gcode stream service - I will ping you on discord before end of this week
@all-contributors please add @jamespearson04 for code and ideas update
@luc-github
I've put up a pull request to add @jamespearson04! :tada:
This PR will add the functionality for streaming gcode files from the ESP Filesystem and attached SD cards.
It includes the functionality to use pause, resume and abort scripts, either specified in the firmware configuration, or within files specified by the configuration. This could be updated to allow the scripts to be specified via web ui quite easily.
This implementation also handles the queueing of commands whilst waiting for responses, making communication over serial simpler for other threads.
The outward facing interface for the gcodehost module consists of the esp3d client message system (
gcodeHostService.process(msg)
), and thepause()
,resume()
andabort()
functions. The message data sent to the gcodehost service will be checked to see if it is a file path, if so, the file referred to by it will open and begin streaming over serial. Only one file stream can be queued/in progress, subsequent requests will be ignored. If it is not a file path, it is assumed that it is a command to be sent to the printer. Commands received in this manner will be sent after the nextok
response from the printer, so as to allow parameters such as temperature to be updated mid-print. Multiple commands received in this manner will be queued and sent in the order that gcodehost received them, unless it is anEMERGENCY_PARSER
command, in which case it will be placed first in the queue.Currently, line resend requests are not implemented, and better support for error reporting needs to be implemented.