Use cs.max_acceleration_units_per_sq_second_normal from ConfigurationStore.

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

View File

@ -100,7 +100,7 @@ void Config_PrintSettings(uint8_t level)
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, 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, cs.max_acceleration_units_per_sq_second_normal[X_AXIS], cs.max_acceleration_units_per_sq_second_normal[Y_AXIS], cs.max_acceleration_units_per_sq_second_normal[Z_AXIS], cs.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],
echomagic, echomagic, acceleration, retract_acceleration,
echomagic, echomagic, minimumfeedrate, mintravelfeedrate, minsegmenttime, max_jerk[X_AXIS], max_jerk[Y_AXIS], max_jerk[Z_AXIS], max_jerk[E_AXIS],
@ -244,8 +244,8 @@ bool Config_RetrieveSettings(uint16_t offset)
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)
max_acceleration_units_per_sq_second_normal[j] = NORMAL_MAX_ACCEL_XY;
if (cs.max_acceleration_units_per_sq_second_normal[j] > NORMAL_MAX_ACCEL_XY)
cs.max_acceleration_units_per_sq_second_normal[j] = NORMAL_MAX_ACCEL_XY;
if (max_acceleration_units_per_sq_second_silent[j] > SILENT_MAX_ACCEL_XY)
max_acceleration_units_per_sq_second_silent[j] = SILENT_MAX_ACCEL_XY;
}

View File

@ -5892,7 +5892,7 @@ Sigma_Exit:
if (val_silent > SILENT_MAX_ACCEL_XY)
val_silent = SILENT_MAX_ACCEL_XY;
}
max_acceleration_units_per_sq_second_normal[i] = val;
cs.max_acceleration_units_per_sq_second_normal[i] = val;
max_acceleration_units_per_sq_second_silent[i] = val_silent;
#else //TMC2130
max_acceleration_units_per_sq_second[i] = val;

View File

@ -80,9 +80,8 @@ float* max_feedrate = cs.max_feedrate_normal;
// Use M201 to override by software
unsigned long max_acceleration_units_per_sq_second_normal[NUM_AXIS];
unsigned long max_acceleration_units_per_sq_second_silent[NUM_AXIS];
unsigned long* max_acceleration_units_per_sq_second = max_acceleration_units_per_sq_second_normal;
unsigned long* max_acceleration_units_per_sq_second = cs.max_acceleration_units_per_sq_second_normal;
float minimumfeedrate;
float acceleration; // Normal acceleration mm/s^2 THIS IS THE DEFAULT ACCELERATION for all moves. M204 SXXXX
@ -1324,7 +1323,7 @@ void update_mode_profile()
if (tmc2130_mode == TMC2130_MODE_NORMAL)
{
max_feedrate = cs.max_feedrate_normal;
max_acceleration_units_per_sq_second = max_acceleration_units_per_sq_second_normal;
max_acceleration_units_per_sq_second = cs.max_acceleration_units_per_sq_second_normal;
}
else if (tmc2130_mode == TMC2130_MODE_SILENT)
{

View File

@ -166,7 +166,6 @@ extern float* max_feedrate;
// Use M201 to override by software
extern unsigned long max_acceleration_units_per_sq_second_normal[NUM_AXIS];
extern unsigned long max_acceleration_units_per_sq_second_silent[NUM_AXIS];
extern unsigned long* max_acceleration_units_per_sq_second;