From 1e894644426fe537aea24e309e70b7e30373e3a1 Mon Sep 17 00:00:00 2001 From: Yannick Richter Date: Tue, 19 Mar 2024 12:25:34 +0100 Subject: [PATCH] Axis reports CPR consistent with pos. Removed TMC special case --- Firmware/FFBoard/Src/Axis.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Firmware/FFBoard/Src/Axis.cpp b/Firmware/FFBoard/Src/Axis.cpp index a17fcc86..7bad14d3 100644 --- a/Firmware/FFBoard/Src/Axis.cpp +++ b/Firmware/FFBoard/Src/Axis.cpp @@ -901,13 +901,13 @@ CommandStatus Axis::command(const ParsedCommand& cmd,std::vector& if (cmd.type == CMDtype::get && this->drv->getEncoder() != nullptr) { uint32_t cpr = this->drv->getEncoder()->getCpr(); -#ifdef TMC4671DRIVER - TMC4671 *tmcdrv = dynamic_cast(this->drv.get()); // Special case for TMC. Get the actual encoder resolution - if (tmcdrv && tmcdrv->hasIntegratedEncoder()) - { - cpr = tmcdrv->getEncCpr(); - } -#endif +//#ifdef TMC4671DRIVER // CPR should be consistent with position. Maybe change TMC to prescale to encoder count or correct readout in UI +// TMC4671 *tmcdrv = dynamic_cast(this->drv.get()); // Special case for TMC. Get the actual encoder resolution +// if (tmcdrv && tmcdrv->hasIntegratedEncoder()) +// { +// cpr = tmcdrv->getEncCpr(); +// } +//#endif replies.emplace_back(cpr); }else{ return CommandStatus::ERR;