mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 06:15:54 +08:00
Merge pull request #1317 from TheRikke/master
Fix connections to devices not based on arduino
This commit is contained in:
commit
cc90fb431c
@ -43,8 +43,8 @@ class Stk500v2(ispBase.IspBase):
|
|||||||
|
|
||||||
self.serial.flushInput()
|
self.serial.flushInput()
|
||||||
self.serial.flushOutput()
|
self.serial.flushOutput()
|
||||||
|
try:
|
||||||
if self.sendMessage([0x10, 0xc8, 0x64, 0x19, 0x20, 0x00, 0x53, 0x03, 0xac, 0x53, 0x00, 0x00]) != [0x10, 0x00]:
|
if self.sendMessage([0x10, 0xc8, 0x64, 0x19, 0x20, 0x00, 0x53, 0x03, 0xac, 0x53, 0x00, 0x00]) != [0x10, 0x00]:
|
||||||
self.close()
|
|
||||||
raise ispBase.IspError("Failed to enter programming mode")
|
raise ispBase.IspError("Failed to enter programming mode")
|
||||||
|
|
||||||
self.sendMessage([0x06, 0x80, 0x00, 0x00, 0x00])
|
self.sendMessage([0x06, 0x80, 0x00, 0x00, 0x00])
|
||||||
@ -52,6 +52,9 @@ class Stk500v2(ispBase.IspBase):
|
|||||||
self._has_checksum = True
|
self._has_checksum = True
|
||||||
else:
|
else:
|
||||||
self._has_checksum = False
|
self._has_checksum = False
|
||||||
|
except ispBase.IspError:
|
||||||
|
self.close()
|
||||||
|
raise
|
||||||
self.serial.timeout = 5
|
self.serial.timeout = 5
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user