DIGIPOTSS in motter current array with PWM, stored to eeprom, and G34 tested

This commit is contained in:
InsanityAutomation
2020-08-09 16:43:08 -04:00
parent fac1a75596
commit fabdb6a51e
2 changed files with 17 additions and 0 deletions
+6
View File
@@ -602,10 +602,14 @@ void GcodeSuite::M422() {
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Final Z Move");
do_blocking_move_to_z(zgrind, MMM_TO_MMS(GANTRY_CALIBRATION_FEEDRATE));
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Backoff");
// Back off end plate, back to normal motion range
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Backoff");
do_blocking_move_to_z(zpounce, MMM_TO_MMS(GANTRY_CALIBRATION_FEEDRATE));
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Restore Current");
// Reset current to original values
#if _REDUCE_CURRENT
@@ -635,6 +639,8 @@ void GcodeSuite::M422() {
#endif
#endif
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Running Post Commands");
#ifdef GANTRY_CALIBRATION_COMMANDS_POST
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Running Post Commands");
gcode.process_subcommands_now_P(PSTR(GANTRY_CALIBRATION_COMMANDS_POST));
+11
View File
@@ -2127,6 +2127,7 @@ void MarlinSettings::postprocess() {
if (!validating)
COPY(stepper.motor_current_setting, motor_current_setting);
#endif
SERIAL_ECHOLN("DIGIPOTS Loaded");
}
//
@@ -2817,6 +2818,16 @@ void MarlinSettings::reset() {
DEBUG_ECHOLNPGM("Digipot Written");
#endif
//
// DIGIPOTS
//
SERIAL_ECHOLN("Writing Digipot");
#if HAS_DIGIPOTSS
static constexpr uint32_t tmp_motor_current_setting[] = DIGIPOT_MOTOR_CURRENT;
LOOP_L_N(q, COUNT(tmp_motor_current_setting))
stepper.digipot_current(q, tmp_motor_current_setting[q]);
#endif
SERIAL_ECHOLN("Digipot Written");
//
// CNC Coordinate System
//