Add TMC2130 support
This commit is contained in:
@ -5884,6 +5884,45 @@ inline void gcode_M117() {
|
||||
*/
|
||||
inline void gcode_M119() { endstops.M119(); }
|
||||
|
||||
#if ENABLED(HAVE_TMC2130DRIVER)
|
||||
/**
|
||||
* M122: Output Trinamic TMC2130 status to serial output. Very bad formatting.
|
||||
*/
|
||||
inline void gcode_M122() {
|
||||
SERIAL_PROTOCOLLNPGM("REPORTING TMC2130 STATUS");
|
||||
#if ENABLED(HAVE_TMC2130DRIVER) && ENABLED(X_IS_TMC2130)
|
||||
stepperX.read_STAT();
|
||||
SERIAL_PROTOCOLLN("X-AXIS: ");
|
||||
SERIAL_PROTOCOLLN((stepperX.isReset() ? "RESET " : "----- "));
|
||||
SERIAL_PROTOCOLLN((stepperX.isError() ? "ERROR " : "----- "));
|
||||
SERIAL_PROTOCOLLN((stepperX.isStallguard() ? "SLGRD " : "----- "));
|
||||
SERIAL_PROTOCOLLN((stepperX.isStandstill() ? "STILL " : "----- "));
|
||||
SERIAL_PROTOCOLLN((stepperX.debug()));
|
||||
SERIAL_PROTOCOLLN("-----");
|
||||
#endif
|
||||
#if ENABLED(HAVE_TMC2130DRIVER) && ENABLED(Y_IS_TMC2130)
|
||||
stepperY.read_STAT();
|
||||
SERIAL_PROTOCOLLN("Y-AXIS: ");
|
||||
SERIAL_PROTOCOLLN((stepperY.isReset() ? "RESET " : "----- "));
|
||||
SERIAL_PROTOCOLLN((stepperY.isError() ? "ERROR " : "----- "));
|
||||
SERIAL_PROTOCOLLN((stepperY.isStallguard() ? "SLGRD " : "----- "));
|
||||
SERIAL_PROTOCOLLN((stepperY.isStandstill() ? "STILL " : "----- "));
|
||||
SERIAL_PROTOCOLLN((stepperY.debug()));
|
||||
SERIAL_PROTOCOLLN("-----");
|
||||
#endif
|
||||
#if ENABLED(HAVE_TMC2130DRIVER) && ENABLED(Z_IS_TMC2130)
|
||||
stepperZ.read_STAT();
|
||||
SERIAL_PROTOCOLLN("Z-AXIS: ");
|
||||
SERIAL_PROTOCOLLN((stepperZ.isReset() ? "RESET " : "----- "));
|
||||
SERIAL_PROTOCOLLN((stepperZ.isError() ? "ERROR " : "----- "));
|
||||
SERIAL_PROTOCOLLN((stepperZ.isStallguard() ? "SLGRD " : "----- "));
|
||||
SERIAL_PROTOCOLLN((stepperZ.isStandstill() ? "STILL " : "----- "));
|
||||
SERIAL_PROTOCOLLN((stepperZ.debug()));
|
||||
SERIAL_PROTOCOLLN("-----");
|
||||
#endif
|
||||
}
|
||||
#endif // HAVE_TMC2130DRIVER
|
||||
|
||||
/**
|
||||
* M120: Enable endstops and set non-homing endstop state to "enabled"
|
||||
*/
|
||||
@ -8057,6 +8096,12 @@ void process_next_command() {
|
||||
gcode_M119();
|
||||
break;
|
||||
|
||||
#if ENABLED(HAVE_TMC2130DRIVER)
|
||||
case 122: // M122: Diagnose, used to debug TMC2130
|
||||
gcode_M122();
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if ENABLED(ULTIPANEL)
|
||||
|
||||
case 145: // M145: Set material heatup parameters
|
||||
|
Reference in New Issue
Block a user