Use cs.max_feedrate_normal from ConfigurationStore.

This commit is contained in:
Marek Bel 2018-09-24 15:09:19 +02:00
parent 3f28632443
commit 02becb5e6a
4 changed files with 6 additions and 8 deletions

View File

@ -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)

View File

@ -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;

View File

@ -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)

View File

@ -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;