Skip to content

Commit

Permalink
Check axis cpr if tmc has encoder
Browse files Browse the repository at this point in the history
  • Loading branch information
Ultrawipf committed Nov 27, 2023
1 parent bdf36ad commit ad3692c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Firmware/FFBoard/Src/Axis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ CommandStatus Axis::command(const ParsedCommand& cmd,std::vector<CommandReply>&
uint32_t cpr = this->drv->getEncoder()->getCpr();
#ifdef TMC4671DRIVER
TMC4671 *tmcdrv = dynamic_cast<TMC4671 *>(this->drv.get()); // Special case for TMC. Get the actual encoder resolution
if (tmcdrv)
if (tmcdrv && tmcdrv->hasIntegratedEncoder())
{
cpr = tmcdrv->getEncCpr();
}
Expand Down

0 comments on commit ad3692c

Please sign in to comment.