change to better (more clear) names (#8050)

set_destination_to_current() changed to set_destination_from_current()

set_current_to_destination() changed to set_current_from_destination()
This commit is contained in:
Roxy-3D
2017-10-21 11:42:26 -05:00
committed by GitHub
parent adf168e68f
commit 72156a2029
17 changed files with 49 additions and 49 deletions

View File

@ -378,7 +378,7 @@ float bilinear_z_offset(const float logical[XYZ]) {
if (cx1 == cx2 && cy1 == cy2) {
// Start and end on same mesh square
line_to_destination(fr_mm_s);
set_current_to_destination();
set_current_from_destination();
return;
}
@ -405,7 +405,7 @@ float bilinear_z_offset(const float logical[XYZ]) {
else {
// Already split on a border
line_to_destination(fr_mm_s);
set_current_to_destination();
set_current_from_destination();
return;
}

View File

@ -69,7 +69,7 @@
if (cx1 == cx2 && cy1 == cy2) {
// Start and end on same mesh square
line_to_destination(fr_mm_s);
set_current_to_destination();
set_current_from_destination();
return;
}
@ -96,7 +96,7 @@
else {
// Already split on a border
line_to_destination(fr_mm_s);
set_current_to_destination();
set_current_from_destination();
return;
}

View File

@ -222,7 +222,7 @@ void unified_bed_leveling::G26() {
if (current_position[Z_AXIS] < Z_CLEARANCE_BETWEEN_PROBES) {
do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES);
stepper.synchronize();
set_current_to_destination();
set_current_from_destination();
}
if (turn_on_heaters()) goto LEAVE;
@ -247,7 +247,7 @@ void unified_bed_leveling::G26() {
ZERO(vertical_mesh_line_flags);
// Move nozzle to the specified height for the first layer
set_destination_to_current();
set_destination_from_current();
destination[Z_AXIS] = g26_layer_height;
move_to(destination, 0.0);
move_to(destination, g26_ooze_amount);
@ -531,7 +531,7 @@ void unified_bed_leveling::move_to(const float &x, const float &y, const float &
G26_line_to_destination(feed_value);
stepper.synchronize();
set_destination_to_current();
set_destination_from_current();
}
// Check if X or Y is involved in the movement.
@ -547,7 +547,7 @@ void unified_bed_leveling::move_to(const float &x, const float &y, const float &
G26_line_to_destination(feed_value);
stepper.synchronize();
set_destination_to_current();
set_destination_from_current();
}
@ -829,7 +829,7 @@ bool unified_bed_leveling::prime_nozzle() {
lcd_setstatusPGM(PSTR("User-Controlled Prime"), 99);
chirp_at_user();
set_destination_to_current();
set_destination_from_current();
recover_filament(destination); // Make sure G26 doesn't think the filament is retracted().
@ -846,7 +846,7 @@ bool unified_bed_leveling::prime_nozzle() {
// but because the planner has a buffer, we won't be able
// to stop as quickly. So we put up with the less smooth
// action to give the user a more responsive 'Stop'.
set_destination_to_current();
set_destination_from_current();
idle();
}
@ -870,11 +870,11 @@ bool unified_bed_leveling::prime_nozzle() {
lcd_setstatusPGM(PSTR("Fixed Length Prime."), 99);
lcd_quick_feedback();
#endif
set_destination_to_current();
set_destination_from_current();
destination[E_AXIS] += g26_prime_length;
G26_line_to_destination(planner.max_feedrate_mm_s[E_AXIS] / 15.0);
stepper.synchronize();
set_destination_to_current();
set_destination_from_current();
retract_filament(destination);
}

View File

@ -39,9 +39,9 @@
extern float destination[XYZE];
#if AVR_AT90USB1286_FAMILY // Teensyduino & Printrboard IDE extensions have compile errors without this
inline void set_current_to_destination() { COPY(current_position, destination); }
inline void set_current_from_destination() { COPY(current_position, destination); }
#else
extern void set_current_to_destination();
extern void set_current_from_destination();
#endif
static void debug_echo_axis(const AxisEnum axis) {
@ -141,7 +141,7 @@
// a reasonable correction would be.
planner._buffer_line(end[X_AXIS], end[Y_AXIS], end[Z_AXIS], end[E_AXIS], feed_rate, extruder);
set_current_to_destination();
set_current_from_destination();
if (g26_debug_flag)
debug_current_and_destination(PSTR("out of bounds in ubl.line_to_destination()"));
@ -189,7 +189,7 @@
if (g26_debug_flag)
debug_current_and_destination(PSTR("FINAL_MOVE in ubl.line_to_destination()"));
set_current_to_destination();
set_current_from_destination();
return;
}
@ -301,7 +301,7 @@
if (current_position[X_AXIS] != end[X_AXIS] || current_position[Y_AXIS] != end[Y_AXIS])
goto FINAL_MOVE;
set_current_to_destination();
set_current_from_destination();
return;
}
@ -362,7 +362,7 @@
if (current_position[X_AXIS] != end[X_AXIS] || current_position[Y_AXIS] != end[Y_AXIS])
goto FINAL_MOVE;
set_current_to_destination();
set_current_from_destination();
return;
}
@ -456,7 +456,7 @@
if (current_position[X_AXIS] != end[X_AXIS] || current_position[Y_AXIS] != end[Y_AXIS])
goto FINAL_MOVE;
set_current_to_destination();
set_current_from_destination();
}
#if UBL_DELTA
@ -598,7 +598,7 @@
} while (segments);
return false; // moved but did not set_current_to_destination();
return false; // moved but did not set_current_from_destination();
}
// Otherwise perform per-segment leveling
@ -681,7 +681,7 @@
ubl_buffer_segment_raw( seg_rx, seg_ry, seg_rz + z_cxcy, seg_le, feedrate );
if (segments == 0 ) // done with last segment
return false; // did not set_current_to_destination()
return false; // did not set_current_from_destination()
seg_rx += seg_dx;
seg_ry += seg_dy;