techninja / cncserver

A RESTful API server for driving serial based CNC devices
133 stars 39 forks source link

Add functionality for importing/exporting base buffered commands #48

Open techninja opened 10 years ago

techninja commented 10 years ago

Seeing as there is already buffer listing if simplified commands (as is now core), this functionality would allow for saving of these lists of commands in a simple "gcode like" format for export, then supply a simple API endpoint for pushing these strings directly into the buffer.

This was dreamed up as a simple method to allow for incredibly simple client implementation to run on a Raspberry Pi and allow for GPIO push button initiation of "pre-rendered" drawings [of course this might also require implementation of pausing and clearing the buffer, and then of course checking the status of said buffer].

This would allow for _exact_ playback of any set of commands/drawings sent through from any program, for any machine type. It does raise some questions about tools that require user input (currently not implemented, but planned for manual tool change machines like the eggbot or tiny cnc). Perhaps as part of the API for sending these lists of instructions, it requires some kind of implementer callback?

Unfortunately these kinds of callbacks are basically impossible via HTTP without implementing websockets as part of the server interaction layer, or something lower level via callbacks registered when being used as a node module (something not available when being run standalone).