Use cs.minsegmenttime from ConfigurationStore.

This commit is contained in:
Marek Bel 2018-09-24 16:22:50 +02:00
parent 10428b30d9
commit bb66bfe6a7
4 changed files with 5 additions and 9 deletions

View File

@ -103,7 +103,7 @@ void Config_PrintSettings(uint8_t level)
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, cs.acceleration, cs.retract_acceleration,
echomagic, echomagic, cs.minimumfeedrate, cs.mintravelfeedrate, minsegmenttime, max_jerk[X_AXIS], max_jerk[Y_AXIS], max_jerk[Z_AXIS], max_jerk[E_AXIS],
echomagic, echomagic, cs.minimumfeedrate, cs.mintravelfeedrate, cs.minsegmenttime, max_jerk[X_AXIS], max_jerk[Y_AXIS], max_jerk[Z_AXIS], max_jerk[E_AXIS],
echomagic, echomagic, add_homing[X_AXIS], add_homing[Y_AXIS], add_homing[Z_AXIS]
#else //TMC2130
printf_P(PSTR(
@ -118,7 +118,7 @@ void Config_PrintSettings(uint8_t level)
echomagic, echomagic, max_feedrate[X_AXIS], max_feedrate[Y_AXIS], max_feedrate[Z_AXIS], max_feedrate[E_AXIS],
echomagic, echomagic, max_acceleration_units_per_sq_second[X_AXIS], max_acceleration_units_per_sq_second[Y_AXIS], max_acceleration_units_per_sq_second[Z_AXIS], max_acceleration_units_per_sq_second[E_AXIS],
echomagic, echomagic, cs.acceleration, cs.retract_acceleration,
echomagic, echomagic, cs.minimumfeedrate, cs.mintravelfeedrate, minsegmenttime, max_jerk[X_AXIS], max_jerk[Y_AXIS], max_jerk[Z_AXIS], max_jerk[E_AXIS],
echomagic, echomagic, cs.minimumfeedrate, cs.mintravelfeedrate, cs.minsegmenttime, max_jerk[X_AXIS], max_jerk[Y_AXIS], max_jerk[Z_AXIS], max_jerk[E_AXIS],
echomagic, echomagic, add_homing[X_AXIS], add_homing[Y_AXIS], add_homing[Z_AXIS]
#endif //TMC2130
);

View File

@ -5963,7 +5963,7 @@ Sigma_Exit:
{
if(code_seen('S')) cs.minimumfeedrate = code_value();
if(code_seen('T')) cs.mintravelfeedrate = code_value();
if(code_seen('B')) minsegmenttime = code_value() ;
if(code_seen('B')) cs.minsegmenttime = code_value() ;
if(code_seen('X')) max_jerk[X_AXIS] = max_jerk[Y_AXIS] = code_value();
if(code_seen('Y')) max_jerk[Y_AXIS] = code_value();
if(code_seen('Z')) max_jerk[Z_AXIS] = code_value();

View File

@ -72,8 +72,6 @@
//=============================public variables ============================
//===========================================================================
unsigned long minsegmenttime;
// Use M203 to override by software
float max_feedrate_silent[NUM_AXIS]; // max speeds for silent mode
float* max_feedrate = cs.max_feedrate_normal;
@ -961,9 +959,9 @@ Having the real displacement of the head, we can calculate the total movement le
if (moves_queued > 1 && moves_queued < (BLOCK_BUFFER_SIZE >> 1)) {
// segment time in micro seconds
unsigned long segment_time = lround(1000000.0/inverse_second);
if (segment_time < minsegmenttime)
if (segment_time < cs.minsegmenttime)
// buffer is draining, add extra time. The amount of time added increases if the buffer is still emptied more.
inverse_second=1000000.0/(segment_time+lround(2*(minsegmenttime-segment_time)/moves_queued));
inverse_second=1000000.0/(segment_time+lround(2*(cs.minsegmenttime-segment_time)/moves_queued));
}
#endif // SLOWDOWN

View File

@ -158,8 +158,6 @@ extern bool e_active();
void check_axes_activity();
extern unsigned long minsegmenttime;
// Use M203 to override by software
extern float max_feedrate_silent[NUM_AXIS];
extern float* max_feedrate;