update idm.py.
fix compatibility Signed-off-by: Sgr A* VMT <1611902585@qq.com>
This commit is contained in:
8
idm.py
8
idm.py
@@ -1330,8 +1330,14 @@ class IDMEndstopWrapper:
|
||||
expire_timeout = TRSYNC_TIMEOUT
|
||||
if len(self._trsyncs) == 1:
|
||||
expire_timeout = TRSYNC_SINGLE_MCU_TIMEOUT
|
||||
for trsync in self._trsyncs:
|
||||
for i, trsync in enumerate(self._trsyncs):
|
||||
try:
|
||||
trsync.start(print_time, self._trigger_completion, expire_timeout)
|
||||
except TypeError:
|
||||
offset = float(i) / len(self._trsyncs)
|
||||
trsync.start(
|
||||
print_time, offset, self._trigger_completion, expire_timeout
|
||||
)
|
||||
etrsync = self._trsyncs[0]
|
||||
ffi_main, ffi_lib = chelper.get_ffi()
|
||||
ffi_lib.trdispatch_start(self._trdispatch, etrsync.REASON_HOST_REQUEST)
|
||||
|
||||
Reference in New Issue
Block a user