diff --git a/Firmware/ConfigurationStore.cpp b/Firmware/ConfigurationStore.cpp index 08334f35..d8dabff7 100644 --- a/Firmware/ConfigurationStore.cpp +++ b/Firmware/ConfigurationStore.cpp @@ -98,7 +98,7 @@ void Config_PrintSettings(uint8_t level) "%SHome offset (mm):\n%S M206 X%.2f Y%.2f Z%.2f\n" ), echomagic, echomagic, cs.axis_steps_per_unit[X_AXIS], cs.axis_steps_per_unit[Y_AXIS], cs.axis_steps_per_unit[Z_AXIS], cs.axis_steps_per_unit[E_AXIS], - echomagic, echomagic, max_feedrate_normal[X_AXIS], max_feedrate_normal[Y_AXIS], max_feedrate_normal[Z_AXIS], max_feedrate_normal[E_AXIS], + echomagic, echomagic, cs.max_feedrate_normal[X_AXIS], cs.max_feedrate_normal[Y_AXIS], cs.max_feedrate_normal[Z_AXIS], cs.max_feedrate_normal[E_AXIS], echomagic, echomagic, max_feedrate_silent[X_AXIS], max_feedrate_silent[Y_AXIS], max_feedrate_silent[Z_AXIS], max_feedrate_silent[E_AXIS], echomagic, echomagic, max_acceleration_units_per_sq_second_normal[X_AXIS], max_acceleration_units_per_sq_second_normal[Y_AXIS], max_acceleration_units_per_sq_second_normal[Z_AXIS], max_acceleration_units_per_sq_second_normal[E_AXIS], echomagic, echomagic, max_acceleration_units_per_sq_second_silent[X_AXIS], max_acceleration_units_per_sq_second_silent[Y_AXIS], max_acceleration_units_per_sq_second_silent[Z_AXIS], max_acceleration_units_per_sq_second_silent[E_AXIS], @@ -240,8 +240,8 @@ bool Config_RetrieveSettings(uint16_t offset) #ifdef TMC2130 for (uint8_t j = X_AXIS; j <= Y_AXIS; j++) { - if (max_feedrate_normal[j] > NORMAL_MAX_FEEDRATE_XY) - max_feedrate_normal[j] = NORMAL_MAX_FEEDRATE_XY; + if (cs.max_feedrate_normal[j] > NORMAL_MAX_FEEDRATE_XY) + cs.max_feedrate_normal[j] = NORMAL_MAX_FEEDRATE_XY; if (max_feedrate_silent[j] > SILENT_MAX_FEEDRATE_XY) max_feedrate_silent[j] = SILENT_MAX_FEEDRATE_XY; if (max_acceleration_units_per_sq_second_normal[j] > NORMAL_MAX_ACCEL_XY) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index cb24202b..bfeb73e7 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -5924,7 +5924,7 @@ Sigma_Exit: if (val_silent > SILENT_MAX_FEEDRATE_XY) val_silent = SILENT_MAX_FEEDRATE_XY; } - max_feedrate_normal[i] = val; + cs.max_feedrate_normal[i] = val; max_feedrate_silent[i] = val_silent; #else //TMC2130 max_feedrate[i] = val; diff --git a/Firmware/planner.cpp b/Firmware/planner.cpp index ef8ba5a8..07d35e4c 100644 --- a/Firmware/planner.cpp +++ b/Firmware/planner.cpp @@ -75,9 +75,8 @@ unsigned long minsegmenttime; // Use M203 to override by software -float max_feedrate_normal[NUM_AXIS]; // max speeds for normal mode float max_feedrate_silent[NUM_AXIS]; // max speeds for silent mode -float* max_feedrate = max_feedrate_normal; +float* max_feedrate = cs.max_feedrate_normal; // Use M201 to override by software @@ -1324,7 +1323,7 @@ void update_mode_profile() { if (tmc2130_mode == TMC2130_MODE_NORMAL) { - max_feedrate = max_feedrate_normal; + max_feedrate = cs.max_feedrate_normal; max_acceleration_units_per_sq_second = max_acceleration_units_per_sq_second_normal; } else if (tmc2130_mode == TMC2130_MODE_SILENT) diff --git a/Firmware/planner.h b/Firmware/planner.h index 5f9f2cb8..ebee45d6 100644 --- a/Firmware/planner.h +++ b/Firmware/planner.h @@ -161,7 +161,6 @@ void check_axes_activity(); extern unsigned long minsegmenttime; // Use M203 to override by software -extern float max_feedrate_normal[NUM_AXIS]; extern float max_feedrate_silent[NUM_AXIS]; extern float* max_feedrate;