mcu: Disable waiting in send_wait_ack() if in debugging mode
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -182,7 +182,6 @@ class MCU_I2C:
|
||||
self.i2c_write_cmd = self.i2c_read_cmd = None
|
||||
printer = self.mcu.get_printer()
|
||||
printer.register_event_handler("klippy:connect", self._handle_connect)
|
||||
self._debugoutput = printer.get_start_args().get('debugoutput')
|
||||
# backward support i2c_write inside the init section
|
||||
self._to_write = []
|
||||
def _handle_connect(self):
|
||||
@@ -217,10 +216,6 @@ class MCU_I2C:
|
||||
if self.i2c_write_cmd is None:
|
||||
self._to_write.append(data)
|
||||
return
|
||||
if self._debugoutput is not None:
|
||||
self.i2c_write_cmd.send([self.oid, data],
|
||||
minclock=minclock, reqclock=reqclock)
|
||||
return
|
||||
self.i2c_write_cmd.send_wait_ack([self.oid, data],
|
||||
minclock=minclock, reqclock=reqclock)
|
||||
def i2c_read(self, write, read_len, retry=True):
|
||||
|
||||
Reference in New Issue
Block a user