💥 Update Motor Current G-codes for extra axes (#23975)

This commit is contained in:
DerAndere
2022-04-19 05:15:15 +02:00
committed by Scott Lahteine
parent d58497bc8e
commit 0041de1a8a
9 changed files with 138 additions and 68 deletions

View File

@ -79,7 +79,7 @@ void GcodeSuite::G34() {
stepper.set_digipot_current(Z_AXIS, target_current);
#elif HAS_MOTOR_CURRENT_PWM
const uint16_t target_current = parser.intval('S', GANTRY_CALIBRATION_CURRENT);
const uint32_t previous_current = stepper.motor_current_setting[Z_AXIS];
const uint32_t previous_current = stepper.motor_current_setting[1]; // Z
stepper.set_digipot_current(1, target_current);
#elif HAS_MOTOR_CURRENT_DAC
const float target_current = parser.floatval('S', GANTRY_CALIBRATION_CURRENT);