Changed default MINIMUM_PLANNER_SPEED -> 0.05

Fixed small bug in arcs
M105 prints now actual_temp/target_temp
master
Erik van der Zalm 13 years ago
parent ae0bf8068b
commit 4ca2f336f0

@ -108,7 +108,7 @@
// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end // Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end
// of the buffer and all stops. This should not be much greater than zero and should only be changed // of the buffer and all stops. This should not be much greater than zero and should only be changed
// if unwanted behavior is observed on a user's machine when running at very slow speeds. // if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 2.0 // (mm/sec) #define MINIMUM_PLANNER_SPEED 0.05// (mm/sec)
//=========================================================================== //===========================================================================
//=============================Additional Features=========================== //=============================Additional Features===========================

@ -850,9 +850,13 @@ void process_commands()
#if (TEMP_0_PIN > -1) #if (TEMP_0_PIN > -1)
SERIAL_PROTOCOLPGM("ok T:"); SERIAL_PROTOCOLPGM("ok T:");
SERIAL_PROTOCOL(degHotend(tmp_extruder)); SERIAL_PROTOCOL(degHotend(tmp_extruder));
SERIAL_PROTOCOLPGM("/");
SERIAL_PROTOCOL(degTargetHotend(tmp_extruder));
#if TEMP_BED_PIN > -1 #if TEMP_BED_PIN > -1
SERIAL_PROTOCOLPGM(" B:"); SERIAL_PROTOCOLPGM(" B:");
SERIAL_PROTOCOL(degBed()); SERIAL_PROTOCOL(degBed());
SERIAL_PROTOCOLPGM("/");
SERIAL_PROTOCOL(degTargetBed());
#endif //TEMP_BED_PIN #endif //TEMP_BED_PIN
#else #else
SERIAL_ERROR_START; SERIAL_ERROR_START;

@ -47,6 +47,8 @@ void mc_arc(float *position, float *target, float *offset, uint8_t axis_0, uint8
float millimeters_of_travel = hypot(angular_travel*radius, fabs(linear_travel)); float millimeters_of_travel = hypot(angular_travel*radius, fabs(linear_travel));
if (millimeters_of_travel < 0.001) { return; } if (millimeters_of_travel < 0.001) { return; }
uint16_t segments = floor(millimeters_of_travel/MM_PER_ARC_SEGMENT); uint16_t segments = floor(millimeters_of_travel/MM_PER_ARC_SEGMENT);
if(segments = 0) segments = 1;
/* /*
// Multiply inverse feed_rate to compensate for the fact that this movement is approximated // Multiply inverse feed_rate to compensate for the fact that this movement is approximated
// by a number of discrete segments. The inverse feed_rate should be correct for the sum of // by a number of discrete segments. The inverse feed_rate should be correct for the sum of

@ -438,7 +438,9 @@ void check_axes_activity() {
} }
else { else {
#if FAN_PIN > -1 #if FAN_PIN > -1
if (FanSpeed != 0) analogWrite(FAN_PIN,FanSpeed); // If buffer is empty use current fan speed if (FanSpeed != 0){
analogWrite(FAN_PIN,FanSpeed); // If buffer is empty use current fan speed
}
#endif #endif
} }
if((DISABLE_X) && (x_active == 0)) disable_x(); if((DISABLE_X) && (x_active == 0)) disable_x();
@ -446,11 +448,14 @@ void check_axes_activity() {
if((DISABLE_Z) && (z_active == 0)) disable_z(); if((DISABLE_Z) && (z_active == 0)) disable_z();
if((DISABLE_E) && (e_active == 0)) { disable_e0();disable_e1();disable_e2(); } if((DISABLE_E) && (e_active == 0)) { disable_e0();disable_e1();disable_e2(); }
#if FAN_PIN > -1 #if FAN_PIN > -1
if((FanSpeed == 0) && (fan_speed ==0)) analogWrite(FAN_PIN, 0); if((FanSpeed == 0) && (fan_speed ==0)) {
#endif analogWrite(FAN_PIN, 0);
}
if (FanSpeed != 0 && tail_fan_speed !=0) { if (FanSpeed != 0 && tail_fan_speed !=0) {
analogWrite(FAN_PIN,tail_fan_speed); analogWrite(FAN_PIN,tail_fan_speed);
} }
#endif
} }
@ -714,9 +719,9 @@ void plan_buffer_line(const float &x, const float &y, const float &z, const floa
if(abs(current_speed[E_AXIS]) > max_e_jerk/2) if(abs(current_speed[E_AXIS]) > max_e_jerk/2)
vmax_junction = min(vmax_junction, max_e_jerk/2); vmax_junction = min(vmax_junction, max_e_jerk/2);
if ((moves_queued > 1) && (previous_nominal_speed > 0.0)) { if ((moves_queued > 1) && (previous_nominal_speed > 0.0001)) {
float jerk = sqrt(pow((current_speed[X_AXIS]-previous_speed[X_AXIS]), 2)+pow((current_speed[Y_AXIS]-previous_speed[Y_AXIS]), 2)); float jerk = sqrt(pow((current_speed[X_AXIS]-previous_speed[X_AXIS]), 2)+pow((current_speed[Y_AXIS]-previous_speed[Y_AXIS]), 2));
if((previous_speed[X_AXIS] != 0.0) || (previous_speed[Y_AXIS] != 0.0)) { if((abs(previous_speed[X_AXIS]) > 0.0001) || (abs(previous_speed[Y_AXIS]) > 0.0001)) {
vmax_junction = block->nominal_speed; vmax_junction = block->nominal_speed;
} }
if (jerk > max_xy_jerk) { if (jerk > max_xy_jerk) {
@ -751,6 +756,7 @@ void plan_buffer_line(const float &x, const float &y, const float &z, const floa
memcpy(previous_speed, current_speed, sizeof(previous_speed)); // previous_speed[] = current_speed[] memcpy(previous_speed, current_speed, sizeof(previous_speed)); // previous_speed[] = current_speed[]
previous_nominal_speed = block->nominal_speed; previous_nominal_speed = block->nominal_speed;
#ifdef ADVANCE #ifdef ADVANCE
// Calculate advance rate // Calculate advance rate
if((block->steps_e == 0) || (block->steps_x == 0 && block->steps_y == 0 && block->steps_z == 0)) { if((block->steps_e == 0) || (block->steps_x == 0 && block->steps_y == 0 && block->steps_z == 0)) {

Loading…
Cancel
Save