Remove TMC_Z_CALIBRATION in favor of Z_STEPPER_AUTO_ALIGN

This commit is contained in:
teemuatlut
2019-01-12 00:56:23 +02:00
committed by Scott Lahteine
parent 7cfce20cd3
commit 1a79878dff
97 changed files with 2 additions and 1119 deletions

View File

@ -384,54 +384,4 @@
}
#endif // USE_SENSORLESS
/**
* TMC Z axis calibration routine
*/
#if ENABLED(TMC_Z_CALIBRATION)
void GcodeSuite::M915() {
const uint16_t _rms = parser.seenval('S') ? parser.value_int() : CALIBRATION_CURRENT,
_z = parser.seenval('Z') ? parser.value_linear_units() : CALIBRATION_EXTRA_HEIGHT;
if (!TEST(axis_known_position, Z_AXIS)) {
SERIAL_ECHOLNPGM("\nPlease home Z axis first");
return;
}
#if AXIS_IS_TMC(Z)
const uint16_t Z_current_1 = stepperZ.getMilliamps();
stepperZ.rms_current(_rms);
#endif
#if AXIS_IS_TMC(Z2)
const uint16_t Z2_current_1 = stepperZ2.getMilliamps();
stepperZ2.rms_current(_rms);
#endif
#if AXIS_IS_TMC(Z3)
const uint16_t Z3_current_1 = stepperZ3.getMilliamps();
stepperZ3.rms_current(_rms);
#endif
SERIAL_ECHOPAIR("\nCalibration current: Z", _rms);
soft_endstops_enabled = false;
do_blocking_move_to_z(Z_MAX_POS+_z);
#if AXIS_IS_TMC(Z)
stepperZ.rms_current(Z_current_1);
#endif
#if AXIS_IS_TMC(Z2)
stepperZ2.rms_current(Z2_current_1);
#endif
#if AXIS_IS_TMC(Z3)
stepperZ3.rms_current(Z3_current_1);
#endif
do_blocking_move_to_z(Z_MAX_POS);
soft_endstops_enabled = true;
SERIAL_ECHOLNPGM("\nHoming Z because we lost steps");
enqueue_and_echo_commands_P(PSTR("G28 Z"));
}
#endif
#endif // HAS_TRINAMIC

View File

@ -662,9 +662,6 @@ void GcodeSuite::process_parsed_command(
#if USE_SENSORLESS
case 914: M914(); break; // M914: Set StallGuard sensitivity.
#endif
#if ENABLED(TMC_Z_CALIBRATION)
case 915: M915(); break; // M915: TMC Z axis calibration.
#endif
#endif
#if HAS_MICROSTEPS

View File

@ -804,9 +804,6 @@ private:
#if USE_SENSORLESS
static void M914();
#endif
#if ENABLED(TMC_Z_CALIBRATION)
static void M915();
#endif
#endif
#if HAS_DIGIPOTSS || HAS_MOTOR_CURRENT_PWM || ENABLED(DIGIPOT_I2C) || ENABLED(DAC_STEPPER_CURRENT)