Closed rockstorm101 closed 9 months ago
- I could not test the TCP connection.
Try to connect to https://github.com/kliment/Printrun/blob/master/testtools/mock-printer.py
Try to connect to https://github.com/kliment/Printrun/blob/master/testtools/mock-printer.py
Of course, thanks! I forgot about that. It communicates without issues with that mock-up on my machine, yey! \o/
Split
printcore.py
into two. All the functionality related to directly communicating with serial ports or TCP sockets is moved intodevice.py
. This way this logic is abstracted fromprintcore.py
, which is now independent of the underlying connection type.This reduces the complexity of
printcore.py
and increases code modularity. Plus it has the advantage of making it simple to add more connection types in the future (if any).Notes:
test_printcore.py
(with a very slight adjustment), so (in theory) merging this PR this does not change/break current API.device.py
andDevice
as the main class but I'm open to suggestions since I'm not entirely happy with the naming.As always, any comments/suggestions are appreciated and I'll be happy to address them.