I refactor Printer class to allow multiple 3D printer vendor.
To add a new printer type class have to be a child class of Printer. It is then possible to add different variables depending on the type of printer: for example, a token for the use of an API.
The class must contain 3 functions:
connect: connect to printer (if necessary)
send: send file to printer
disconnect: disconnect from printer (if necessary)
I refactor
Printer
class to allow multiple 3D printer vendor.To add a new printer type class have to be a child class of
Printer
. It is then possible to add different variables depending on the type of printer: for example, a token for the use of an API. The class must contain 3 functions:connect
: connect to printer (if necessary)send
: send file to printerdisconnect
: disconnect from printer (if necessary)Here's a snipset of a typical class:
I've also added (and tested) integration with octoprint and prusa (mini, mk4, xl).