tmc: Fix typo in get_status()

Fix missing variable assignement introduced in commit 5fd1c985.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-08-30 14:17:42 -04:00
parent f11acd8065
commit dcf8cb82a3
1 changed files with 1 additions and 0 deletions

View File

@ -371,6 +371,7 @@ class TMCCommandHelper:
logging.info("TMC %s failed to init: %s", self.name, str(e)) logging.info("TMC %s failed to init: %s", self.name, str(e))
# get_status information export # get_status information export
def get_status(self, eventtime=None): def get_status(self, eventtime=None):
cpos = None
if self.stepper is not None and self.mcu_phase_offset is not None: if self.stepper is not None and self.mcu_phase_offset is not None:
cpos = self.stepper.mcu_to_commanded_position(self.mcu_phase_offset) cpos = self.stepper.mcu_to_commanded_position(self.mcu_phase_offset)
res = {'mcu_phase_offset': self.mcu_phase_offset, res = {'mcu_phase_offset': self.mcu_phase_offset,