Rename axis_steps_per_sqr_second to max_acceleration_steps_per_s2
This commit is contained in:
parent
c067318427
commit
1984091c10
|
|
@ -6334,7 +6334,7 @@ Sigma_Exit:
|
||||||
float factor = cs.axis_steps_per_unit[i] / value; // increase e constants if M92 E14 is given for netfab.
|
float factor = cs.axis_steps_per_unit[i] / value; // increase e constants if M92 E14 is given for netfab.
|
||||||
cs.max_jerk[E_AXIS] *= factor;
|
cs.max_jerk[E_AXIS] *= factor;
|
||||||
max_feedrate[i] *= factor;
|
max_feedrate[i] *= factor;
|
||||||
axis_steps_per_sqr_second[i] *= factor;
|
max_acceleration_steps_per_s2[i] *= factor;
|
||||||
}
|
}
|
||||||
cs.axis_steps_per_unit[i] = value;
|
cs.axis_steps_per_unit[i] = value;
|
||||||
#if defined(FILAMENT_SENSOR) && (FILAMENT_SENSOR_TYPE == FSENSOR_PAT9125)
|
#if defined(FILAMENT_SENSOR) && (FILAMENT_SENSOR_TYPE == FSENSOR_PAT9125)
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ float* max_feedrate = cs.max_feedrate_normal;
|
||||||
|
|
||||||
// Use M201 to override by software
|
// Use M201 to override by software
|
||||||
unsigned long* max_acceleration_units_per_sq_second = cs.max_acceleration_units_per_sq_second_normal;
|
unsigned long* max_acceleration_units_per_sq_second = cs.max_acceleration_units_per_sq_second_normal;
|
||||||
unsigned long axis_steps_per_sqr_second[NUM_AXIS];
|
unsigned long max_acceleration_steps_per_s2[NUM_AXIS];
|
||||||
|
|
||||||
#ifdef ENABLE_AUTO_BED_LEVELING
|
#ifdef ENABLE_AUTO_BED_LEVELING
|
||||||
// this holds the required transform to compensate for bed level
|
// this holds the required transform to compensate for bed level
|
||||||
|
|
@ -1064,14 +1064,14 @@ Having the real displacement of the head, we can calculate the total movement le
|
||||||
|
|
||||||
// Limit acceleration per axis
|
// Limit acceleration per axis
|
||||||
//FIXME Vojtech: One shall rather limit a projection of the acceleration vector instead of using the limit.
|
//FIXME Vojtech: One shall rather limit a projection of the acceleration vector instead of using the limit.
|
||||||
if(((float)accel * (float)block->steps_x.wide / (float)block->step_event_count.wide) > axis_steps_per_sqr_second[X_AXIS])
|
if(((float)accel * (float)block->steps_x.wide / (float)block->step_event_count.wide) > max_acceleration_steps_per_s2[X_AXIS])
|
||||||
{ accel = axis_steps_per_sqr_second[X_AXIS]; }
|
{ accel = max_acceleration_steps_per_s2[X_AXIS]; }
|
||||||
if(((float)accel * (float)block->steps_y.wide / (float)block->step_event_count.wide) > axis_steps_per_sqr_second[Y_AXIS])
|
if(((float)accel * (float)block->steps_y.wide / (float)block->step_event_count.wide) > max_acceleration_steps_per_s2[Y_AXIS])
|
||||||
{ accel = axis_steps_per_sqr_second[Y_AXIS]; }
|
{ accel = max_acceleration_steps_per_s2[Y_AXIS]; }
|
||||||
if(((float)accel * (float)block->steps_e.wide / (float)block->step_event_count.wide) > axis_steps_per_sqr_second[E_AXIS])
|
if(((float)accel * (float)block->steps_e.wide / (float)block->step_event_count.wide) > max_acceleration_steps_per_s2[E_AXIS])
|
||||||
{ accel = axis_steps_per_sqr_second[E_AXIS]; }
|
{ accel = max_acceleration_steps_per_s2[E_AXIS]; }
|
||||||
if(((float)accel * (float)block->steps_z.wide / (float)block->step_event_count.wide ) > axis_steps_per_sqr_second[Z_AXIS])
|
if(((float)accel * (float)block->steps_z.wide / (float)block->step_event_count.wide ) > max_acceleration_steps_per_s2[Z_AXIS])
|
||||||
{ accel = axis_steps_per_sqr_second[Z_AXIS]; }
|
{ accel = max_acceleration_steps_per_s2[Z_AXIS]; }
|
||||||
}
|
}
|
||||||
// Acceleration of the segment, in mm/sec^2
|
// Acceleration of the segment, in mm/sec^2
|
||||||
block->acceleration_steps_per_s2 = accel;
|
block->acceleration_steps_per_s2 = accel;
|
||||||
|
|
@ -1372,7 +1372,7 @@ void set_extrude_min_temp(int temp)
|
||||||
void reset_acceleration_rates()
|
void reset_acceleration_rates()
|
||||||
{
|
{
|
||||||
for(int8_t i=0; i < NUM_AXIS; i++)
|
for(int8_t i=0; i < NUM_AXIS; i++)
|
||||||
axis_steps_per_sqr_second[i] = max_acceleration_units_per_sq_second[i] * cs.axis_steps_per_unit[i];
|
max_acceleration_steps_per_s2[i] = max_acceleration_units_per_sq_second[i] * cs.axis_steps_per_unit[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TMC2130
|
#ifdef TMC2130
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,7 @@ extern float* max_feedrate;
|
||||||
|
|
||||||
// Use M201 to override by software
|
// Use M201 to override by software
|
||||||
extern unsigned long* max_acceleration_units_per_sq_second;
|
extern unsigned long* max_acceleration_units_per_sq_second;
|
||||||
extern unsigned long axis_steps_per_sqr_second[NUM_AXIS];
|
extern unsigned long max_acceleration_steps_per_s2[NUM_AXIS];
|
||||||
|
|
||||||
extern long position[NUM_AXIS];
|
extern long position[NUM_AXIS];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue