nneves / 3DPrinterInterface

3D Printer Interface
15 stars 3 forks source link

Clean core.js code to use only the readable/writable Stream interface for all related GCODE printer operations #7

Closed nneves closed 11 years ago

nneves commented 11 years ago

spWrite() direct Serial Port write functions is currently exported on the core.js module due to previous port from the original prototype.

All related GCODE data should use the standard readable/writable Stream interface, this means that stream from .gcode file and direct webinterface sendGCode command will only use this channel.

nneves commented 11 years ago

Already have un-exported core.js:spWrite() function from the module and re-directed the mainapp.js:sendPrinterCmd() to use the core.js:writableStream.

Found some additional issues while printing .gcode file stream and sending webinterface manual GCODE commands that need to be fixed (related with issue #3)

WorkInProgress...

nneves commented 11 years ago

Deployed the new re-factored core.js but still need to test it properly before closing related issues.

nneves commented 11 years ago

Tested and made a small fix, gcode UI/frontend commands will now bypass the standard i/oStream interface (normally used to pipe gcode file stream) and go directly into the lower layer jsonStream (this stream will print the gcode lines into the printer serial port).

This will allow to send parallel gcode commands while printing from the generic ioStream. This should be used with extra attention, should only allow to send special gcode commands that don't affect the printing functionality such as 'request temperature' command, etc. (restrictions filter still required to be implemented)

Also, this will allow to RESET/HALT the printer if something goes wrong (but will required to abort the current stream from the i/oStream interface).