Add tmc currents debug

This commit is contained in:
Alex Voinea 2024-02-23 12:50:51 +01:00
parent 941d3ff8af
commit a503730f04
No known key found for this signature in database
GPG Key ID: 37EDFD565CB33BAD
1 changed files with 3 additions and 1 deletions

View File

@ -550,7 +550,9 @@ static void SetCurrents(const uint8_t axis, const MotorCurrents &curr) {
};
IHoldRun ihold_irun(iHold, iRun);
#ifdef DEBUG_TMC_CURRENTS
printf_P(PSTR("SetCurrents(axis=%u, iHold=%u, iRun=%u, vsense=%u, reg=%08lX)\n"), axis, iHold, iRun, curr.getvSense(), ihold_irun.dw);
#endif //DEBUG_TMC_CURRENTS
tmc2130_wr(axis, TMC2130_REG_IHOLD_IRUN, ihold_irun.dw);
}