plus4的klipper版本

This commit is contained in:
whb0514
2024-09-02 13:37:34 +08:00
parent 653d7a8f6e
commit b90736975b
1006 changed files with 1195894 additions and 11114 deletions

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python
# Script to parse a serial port data dump
#
# Copyright (C) 2016 Kevin O'Connor <kevin@koconnor.net>
@@ -23,12 +23,12 @@ def main():
f = open(data_filename, 'rb')
fd = f.fileno()
data = ""
data = bytearray()
while 1:
newdata = os.read(fd, 4096)
if not newdata:
break
data += newdata
data += bytearray(newdata)
while 1:
l = mp.check_packet(data)
if l == 0:
@@ -37,7 +37,7 @@ def main():
logging.error("Invalid data")
data = data[-l:]
continue
msgs = mp.dump(bytearray(data[:l]))
msgs = mp.dump(data[:l])
sys.stdout.write('\n'.join(msgs[1:]) + '\n')
data = data[l:]