Skip to content

Commit

Permalink
tmc2208: Fix prev commit to pass tests
Browse files Browse the repository at this point in the history
get_register(): Skip HW access when not connected to real HW
  • Loading branch information
lorf committed Jan 29, 2019
1 parent 665fc88 commit 347600b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions klippy/extras/tmc2208.py
Expand Up @@ -370,6 +370,9 @@ def handle_connect(self):
def get_register(self, reg_name):
reg = Registers[reg_name]
msg = encode_tmc2208_read(0xf5, 0x00, reg)
# Skip when not connected to a real hardware
if self.printer.get_start_args().get('debugoutput') is not None:
return 0
for retry in range(5):
params = self.tmcuart_send_cmd.send_with_response(
[self.oid, msg, 10], 'tmcuart_response', self.oid)
Expand Down

0 comments on commit 347600b

Please sign in to comment.