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

@ -260,8 +260,7 @@ class TMC2130:
current_helper = TMCCurrentHelper(config, self.mcu_tmc)
cmdhelper = tmc.TMCCommandHelper(config, self.mcu_tmc, current_helper)
cmdhelper.setup_register_dump(ReadRegisters)
self.get_microsteps = cmdhelper.get_microsteps
self.get_phase = cmdhelper.get_phase
self.get_phase_offset = cmdhelper.get_phase_offset
# Setup basic register values
tmc.TMCStealthchopHelper(config, self.mcu_tmc, TMC_FREQUENCY)
# Allow other registers to be set from the config