Browse Source

Tweaks to M915

pull/1/head
Scott Lahteine 6 years ago
parent
commit
045ee28c50
  1. 8
      Marlin/src/gcode/feature/trinamic/M911-M915.cpp

8
Marlin/src/gcode/feature/trinamic/M911-M915.cpp

@ -258,8 +258,8 @@ void GcodeSuite::M912() {
*/
#if ENABLED(TMC_Z_CALIBRATION)
void GcodeSuite::M915() {
uint16_t _rms = parser.seenval('S') ? parser.value_int() : CALIBRATION_CURRENT;
uint16_t _z = parser.seenval('Z') ? parser.value_int() : CALIBRATION_EXTRA_HEIGHT;
const uint16_t _rms = parser.seenval('S') ? parser.value_int() : CALIBRATION_CURRENT,
_z = parser.seenval('Z') ? parser.value_linear_units() : CALIBRATION_EXTRA_HEIGHT;
if (!axis_known_position[Z_AXIS]) {
SERIAL_ECHOLNPGM("\nPlease home Z axis first");
@ -267,11 +267,11 @@ void GcodeSuite::M912() {
}
#if Z_IS_TRINAMIC
uint16_t Z_current_1 = stepperZ.getCurrent();
const uint16_t Z_current_1 = stepperZ.getCurrent();
stepperZ.setCurrent(_rms, R_SENSE, HOLD_MULTIPLIER);
#endif
#if Z2_IS_TRINAMIC
uint16_t Z2_current_1 = stepperZ2.getCurrent();
const uint16_t Z2_current_1 = stepperZ2.getCurrent();
stepperZ2.setCurrent(_rms, R_SENSE, HOLD_MULTIPLIER);
#endif

Loading…
Cancel
Save