mariner icon indicating copy to clipboard operation
mariner copied to clipboard

GCODE console

Open dadwarf opened this issue 4 years ago • 1 comments

A great thing for testing : a console to send GCODE

dadwarf avatar Oct 13 '20 19:10 dadwarf

I've been thinking about this one. It would be ideal if we could leave the gcode console open while you use mariner (so you can see what is going on and use this as a debugging tool).

The problem is, the way I implemented communication with the serial port assumes that there's only one process talking to the printer at a time.

I think I need to invest a little bit of time on adding a single thread that does all the communication with the printer through the serial port. Then whenever an HTTP request comes in through flask, it would just talk to that thread instead of talking to the serial port directly.

This will be a bit involved so I'm not sure when I'll have time for it, so for now I've been just sshing into my pi and using minicom:

$ minicom -D /dev/serial0 -b 115200

I do think that the improvements would be worth it though, since they would also solve some of the problems around concurrent requests I see sometimes (if you refresh mariner a few times you'll see that the request for printer status will fail, for example). So it's best to have a single thread be responsible for talking to the printer.

luizribeiro avatar Oct 17 '20 04:10 luizribeiro