Wallacoloo / printipi

3d printing directly through the Raspberry Pi's GPIO pins
MIT License
141 stars 43 forks source link

M109 does not wait until temperature is reached before returning #41

Open Wallacoloo opened 9 years ago

Wallacoloo commented 9 years ago

M109 Sxxx is supposed to set the temperature to xxx and then wait until that temperature is reached before handling any other commands.

I believe we still want to handle a large class of commands - M105 (get extruder temperature), M20-M32 (SD card access), etc, but just not perform any movements until the temperature is reached.

Unfortunately, implementing it in this way will essentially hang serial communications if given M109 and then a G1 command, until the temperature is reached. This makes it so a host like Octoprint cannot track temperature over time during this period.

This may be fixable by intentionally dropping movement commands during this period, and asking for resends. This gives Octoprint an opportunity to periodically inject M105 commands into the stream.

Wallacoloo commented 9 years ago

Implemented in devel, but M116 implementation does not handle heated beds or multiple hotends.