tmc2208: Check for debugging mode before checking for a retransmit

Allow the tmc2208 code to be run from regression test cases.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2019-01-10 09:54:26 -05:00
parent c9c8ae0499
commit 2c31fd8313
1 changed files with 2 additions and 0 deletions

View File

@ -209,6 +209,8 @@ class TMC2208:
"Unable to read tmc2208 '%s' register %s" % (self.name, reg_name)) "Unable to read tmc2208 '%s' register %s" % (self.name, reg_name))
def set_register(self, reg_name, val): def set_register(self, reg_name, val):
msg = encode_tmc2208_write(0xf5, 0x00, Registers[reg_name] | 0x80, val) msg = encode_tmc2208_write(0xf5, 0x00, Registers[reg_name] | 0x80, val)
if self.printer.get_start_args().get('debugoutput') is not None:
return
for retry in range(5): for retry in range(5):
ifcnt = self.ifcnt ifcnt = self.ifcnt
if ifcnt is None: if ifcnt is None: