endstop_phase: Convert to using tmc mcu_phase_offset

Now that the TMC drivers track the phase offset, use that to implement
endstop phase.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-08-06 00:38:49 -04:00
parent 06b8169f56
commit f759df3cd7
7 changed files with 26 additions and 33 deletions

View file

@ -192,8 +192,7 @@ class TMC2208:
current_helper = tmc2130.TMCCurrentHelper(config, self.mcu_tmc)
cmdhelper = tmc.TMCCommandHelper(config, self.mcu_tmc, current_helper)
cmdhelper.setup_register_dump(ReadRegisters, self.read_translate)
self.get_microsteps = cmdhelper.get_microsteps
self.get_phase = cmdhelper.get_phase
self.get_phase_offset = cmdhelper.get_phase_offset
# Setup basic register values
self.fields.set_field("mstep_reg_select", True)
self.fields.set_field("multistep_filt", True)