Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kliment/Printrun.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvolconst <20997907+volconst@users.noreply.github.com>2022-01-16 22:22:47 +0300
committervolconst <20997907+volconst@users.noreply.github.com>2022-01-16 22:22:47 +0300
commit95b6679e5d2886d091a8adbb095ad1fa1419069b (patch)
tree25c1162489078c07c0102b891da67ad3770a99ce
parentbcbfec6c850e72a38a774a9176c366e8f6c1da4c (diff)
Test multiple extruders status line parsing
-rwxr-xr-xtesttools/mock-printer.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/testtools/mock-printer.py b/testtools/mock-printer.py
index b1b72c2..a28b695 100755
--- a/testtools/mock-printer.py
+++ b/testtools/mock-printer.py
@@ -1,12 +1,9 @@
#!/usr/bin/env python3
# Test network communication without networked 3d printer
# Usage:
-# bash1$ ./mock-printer.py
-# bash2$ ./pronsole
-# pronsole> connect localhost:8080
-# ...> load sliced.gcode
-# ...> print
-# ...> etc...
+# bash1$ ./testtools/mock-printer.py
+# bash2$ ./pronterface.py
+# Enter localhost:8080 in Port, press Connect, Load file, Print
import socket
with socket.socket() as s:
s.bind(('127.0.0.1', 8080))
@@ -22,7 +19,9 @@ with socket.socket() as s:
break
print(msg)
if msg == b'M105\n':
- c.sendall(('ok T:%d\n'%(20 + temp)).encode('ascii'))
+ # c.sendall(('ok T:%d\n'%(20 + temp)).encode('ascii'))
+ # test multiple extruders, see #1234
+ c.sendall('ok T0:24.06 /34.00 B:23.45 /0.00 T1:44.28 /54 @:0 B@:0 @0:0 @1:0\n'.encode('ascii'))
temp = (temp + 1)%30
else:
c.sendall(b'ok\n')