Skip to content

Commit

Permalink
Fix SPI Trinamic drivers so the register with the stepping engine
Browse files Browse the repository at this point in the history
Standard stepper and Trinamic Uart derivatives worked, but Trinamic
SPI driver failed to call their base class's init() method.
  • Loading branch information
MitchBradley committed Oct 13, 2024
1 parent 4e268bc commit b71fea8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions FluidNC/src/Motors/TMC2130Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
namespace MotorDrivers {

void TMC2130Driver::init() {
TrinamicSpiDriver::init();

uint8_t cs_id;
cs_id = setupSPI();

Expand Down
2 changes: 2 additions & 0 deletions FluidNC/src/Motors/TMC5160Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
namespace MotorDrivers {

void TMC5160Driver::init() {
TrinamicSpiDriver::init();

uint8_t cs_id;
cs_id = setupSPI();

Expand Down
6 changes: 5 additions & 1 deletion FluidNC/src/Motors/TMC5160ProDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
namespace MotorDrivers {

void TMC5160ProDriver::init() {
TrinamicSpiDriver::init();

uint8_t cs_id;
cs_id = setupSPI();

Expand All @@ -26,7 +28,9 @@ namespace MotorDrivers {
TrinamicBase::config_motor();
}

bool TMC5160ProDriver::test() { return checkVersion(0x30, tmc5160->version()); }
bool TMC5160ProDriver::test() {
return checkVersion(0x30, tmc5160->version());
}

void TMC5160ProDriver::set_registers(bool isHoming) {
if (_has_errors) {
Expand Down

0 comments on commit b71fea8

Please sign in to comment.