mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-10 15:28:56 -07:00
Listening now correctly works
This commit is contained in:
parent
3fa02d3710
commit
bd651c6bcb
4 changed files with 14 additions and 16 deletions
|
|
@ -56,7 +56,7 @@ class IspBase():
|
|||
"""
|
||||
raise IspError("Called undefined verifyFlash")
|
||||
|
||||
class IspError():
|
||||
class IspError(BaseException):
|
||||
def __init__(self, value):
|
||||
self.value = value
|
||||
def __str__(self):
|
||||
|
|
|
|||
|
|
@ -127,10 +127,8 @@ class Stk500v2(ispBase.IspBase):
|
|||
for c in data:
|
||||
message += struct.pack(">B", c)
|
||||
checksum = 0
|
||||
print("messsage " , message)
|
||||
for c in message:
|
||||
print(c)
|
||||
checksum ^= ord(c)
|
||||
checksum ^= c
|
||||
message += struct.pack(">B", checksum)
|
||||
try:
|
||||
self.serial.write(message)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue