mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-27 13:56:24 +00:00
change to better (more clear) names (#8049)
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:
parent
fa44130734
commit
e9bc9a2ab4
@ -134,10 +134,10 @@
|
|||||||
extern char lcd_status_message[];
|
extern char lcd_status_message[];
|
||||||
#endif
|
#endif
|
||||||
extern float destination[XYZE];
|
extern float destination[XYZE];
|
||||||
void set_destination_to_current();
|
void set_destination_from_current();
|
||||||
void prepare_move_to_destination();
|
void prepare_move_to_destination();
|
||||||
inline void sync_plan_position_e() { planner.set_e_position_mm(current_position[E_AXIS]); }
|
inline void sync_plan_position_e() { planner.set_e_position_mm(current_position[E_AXIS]); }
|
||||||
inline void set_current_to_destination() { COPY(current_position, destination); }
|
inline void set_current_from_destination() { COPY(current_position, destination); }
|
||||||
#if ENABLED(NEWPANEL)
|
#if ENABLED(NEWPANEL)
|
||||||
void lcd_setstatusPGM(const char* const message, const int8_t level);
|
void lcd_setstatusPGM(const char* const message, const int8_t level);
|
||||||
void chirp_at_user();
|
void chirp_at_user();
|
||||||
@ -225,7 +225,7 @@
|
|||||||
if (current_position[Z_AXIS] < Z_CLEARANCE_BETWEEN_PROBES) {
|
if (current_position[Z_AXIS] < Z_CLEARANCE_BETWEEN_PROBES) {
|
||||||
do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES);
|
do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES);
|
||||||
stepper.synchronize();
|
stepper.synchronize();
|
||||||
set_current_to_destination();
|
set_current_from_destination();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (turn_on_heaters()) goto LEAVE;
|
if (turn_on_heaters()) goto LEAVE;
|
||||||
@ -250,7 +250,7 @@
|
|||||||
ZERO(vertical_mesh_line_flags);
|
ZERO(vertical_mesh_line_flags);
|
||||||
|
|
||||||
// Move nozzle to the specified height for the first layer
|
// Move nozzle to the specified height for the first layer
|
||||||
set_destination_to_current();
|
set_destination_from_current();
|
||||||
destination[Z_AXIS] = g26_layer_height;
|
destination[Z_AXIS] = g26_layer_height;
|
||||||
move_to(destination, 0.0);
|
move_to(destination, 0.0);
|
||||||
move_to(destination, g26_ooze_amount);
|
move_to(destination, g26_ooze_amount);
|
||||||
@ -534,7 +534,7 @@
|
|||||||
G26_line_to_destination(feed_value);
|
G26_line_to_destination(feed_value);
|
||||||
|
|
||||||
stepper.synchronize();
|
stepper.synchronize();
|
||||||
set_destination_to_current();
|
set_destination_from_current();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if X or Y is involved in the movement.
|
// Check if X or Y is involved in the movement.
|
||||||
@ -550,7 +550,7 @@
|
|||||||
G26_line_to_destination(feed_value);
|
G26_line_to_destination(feed_value);
|
||||||
|
|
||||||
stepper.synchronize();
|
stepper.synchronize();
|
||||||
set_destination_to_current();
|
set_destination_from_current();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -832,7 +832,7 @@
|
|||||||
lcd_setstatusPGM(PSTR("User-Controlled Prime"), 99);
|
lcd_setstatusPGM(PSTR("User-Controlled Prime"), 99);
|
||||||
chirp_at_user();
|
chirp_at_user();
|
||||||
|
|
||||||
set_destination_to_current();
|
set_destination_from_current();
|
||||||
|
|
||||||
recover_filament(destination); // Make sure G26 doesn't think the filament is retracted().
|
recover_filament(destination); // Make sure G26 doesn't think the filament is retracted().
|
||||||
|
|
||||||
@ -849,7 +849,7 @@
|
|||||||
// but because the planner has a buffer, we won't be able
|
// but because the planner has a buffer, we won't be able
|
||||||
// to stop as quickly. So we put up with the less smooth
|
// to stop as quickly. So we put up with the less smooth
|
||||||
// action to give the user a more responsive 'Stop'.
|
// action to give the user a more responsive 'Stop'.
|
||||||
set_destination_to_current();
|
set_destination_from_current();
|
||||||
idle();
|
idle();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -873,11 +873,11 @@
|
|||||||
lcd_setstatusPGM(PSTR("Fixed Length Prime."), 99);
|
lcd_setstatusPGM(PSTR("Fixed Length Prime."), 99);
|
||||||
lcd_quick_feedback();
|
lcd_quick_feedback();
|
||||||
#endif
|
#endif
|
||||||
set_destination_to_current();
|
set_destination_from_current();
|
||||||
destination[E_AXIS] += g26_prime_length;
|
destination[E_AXIS] += g26_prime_length;
|
||||||
G26_line_to_destination(planner.max_feedrate_mm_s[E_AXIS] / 15.0);
|
G26_line_to_destination(planner.max_feedrate_mm_s[E_AXIS] / 15.0);
|
||||||
stepper.synchronize();
|
stepper.synchronize();
|
||||||
set_destination_to_current();
|
set_destination_from_current();
|
||||||
retract_filament(destination);
|
retract_filament(destination);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -350,7 +350,7 @@
|
|||||||
|| isnan(ubl.z_values[0][0]))
|
|| isnan(ubl.z_values[0][0]))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(NEOPIXEL_LED)
|
#if ENABLED(NEOPIXEL_LED)
|
||||||
#if NEOPIXEL_TYPE == NEO_RGB || NEOPIXEL_TYPE == NEO_RBG || NEOPIXEL_TYPE == NEO_GRB || NEOPIXEL_TYPE == NEO_GBR || NEOPIXEL_TYPE == NEO_BRG || NEOPIXEL_TYPE == NEO_BGR
|
#if NEOPIXEL_TYPE == NEO_RGB || NEOPIXEL_TYPE == NEO_RBG || NEOPIXEL_TYPE == NEO_GRB || NEOPIXEL_TYPE == NEO_GBR || NEOPIXEL_TYPE == NEO_BRG || NEOPIXEL_TYPE == NEO_BGR
|
||||||
#define NEO_WHITE 255, 255, 255
|
#define NEO_WHITE 255, 255, 255
|
||||||
#else
|
#else
|
||||||
@ -379,7 +379,7 @@ float current_position[XYZE] = { 0.0 };
|
|||||||
/**
|
/**
|
||||||
* Cartesian Destination
|
* Cartesian Destination
|
||||||
* A temporary position, usually applied to 'current_position'.
|
* A temporary position, usually applied to 'current_position'.
|
||||||
* Set with 'gcode_get_destination' or 'set_destination_to_current'.
|
* Set with 'gcode_get_destination' or 'set_destination_from_current'.
|
||||||
* 'line_to_destination' sets 'current_position' to 'destination'.
|
* 'line_to_destination' sets 'current_position' to 'destination'.
|
||||||
*/
|
*/
|
||||||
float destination[XYZE] = { 0.0 };
|
float destination[XYZE] = { 0.0 };
|
||||||
@ -1633,8 +1633,8 @@ inline void line_to_destination(const float fr_mm_s) {
|
|||||||
}
|
}
|
||||||
inline void line_to_destination() { line_to_destination(feedrate_mm_s); }
|
inline void line_to_destination() { line_to_destination(feedrate_mm_s); }
|
||||||
|
|
||||||
inline void set_current_to_destination() { COPY(current_position, destination); }
|
inline void set_current_from_destination() { COPY(current_position, destination); }
|
||||||
inline void set_destination_to_current() { COPY(destination, current_position); }
|
inline void set_destination_from_current() { COPY(destination, current_position); }
|
||||||
|
|
||||||
#if IS_KINEMATIC
|
#if IS_KINEMATIC
|
||||||
/**
|
/**
|
||||||
@ -1660,7 +1660,7 @@ inline void set_destination_to_current() { COPY(destination, current_position);
|
|||||||
planner.buffer_line_kinematic(destination, MMS_SCALED(fr_mm_s ? fr_mm_s : feedrate_mm_s), active_extruder);
|
planner.buffer_line_kinematic(destination, MMS_SCALED(fr_mm_s ? fr_mm_s : feedrate_mm_s), active_extruder);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
set_current_to_destination();
|
set_current_from_destination();
|
||||||
}
|
}
|
||||||
#endif // IS_KINEMATIC
|
#endif // IS_KINEMATIC
|
||||||
|
|
||||||
@ -1681,10 +1681,10 @@ void do_blocking_move_to(const float &lx, const float &ly, const float &lz, cons
|
|||||||
|
|
||||||
feedrate_mm_s = fr_mm_s ? fr_mm_s : XY_PROBE_FEEDRATE_MM_S;
|
feedrate_mm_s = fr_mm_s ? fr_mm_s : XY_PROBE_FEEDRATE_MM_S;
|
||||||
|
|
||||||
set_destination_to_current(); // sync destination at the start
|
set_destination_from_current(); // sync destination at the start
|
||||||
|
|
||||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||||
if (DEBUGGING(LEVELING)) DEBUG_POS("set_destination_to_current", destination);
|
if (DEBUGGING(LEVELING)) DEBUG_POS("set_destination_from_current", destination);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// when in the danger zone
|
// when in the danger zone
|
||||||
@ -1693,7 +1693,7 @@ void do_blocking_move_to(const float &lx, const float &ly, const float &lz, cons
|
|||||||
destination[X_AXIS] = lx; // move directly (uninterpolated)
|
destination[X_AXIS] = lx; // move directly (uninterpolated)
|
||||||
destination[Y_AXIS] = ly;
|
destination[Y_AXIS] = ly;
|
||||||
destination[Z_AXIS] = lz;
|
destination[Z_AXIS] = lz;
|
||||||
prepare_uninterpolated_move_to_destination(); // set_current_to_destination
|
prepare_uninterpolated_move_to_destination(); // set_current_from_destination
|
||||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||||
if (DEBUGGING(LEVELING)) DEBUG_POS("danger zone move", current_position);
|
if (DEBUGGING(LEVELING)) DEBUG_POS("danger zone move", current_position);
|
||||||
#endif
|
#endif
|
||||||
@ -1701,7 +1701,7 @@ void do_blocking_move_to(const float &lx, const float &ly, const float &lz, cons
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
destination[Z_AXIS] = delta_clip_start_height;
|
destination[Z_AXIS] = delta_clip_start_height;
|
||||||
prepare_uninterpolated_move_to_destination(); // set_current_to_destination
|
prepare_uninterpolated_move_to_destination(); // set_current_from_destination
|
||||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||||
if (DEBUGGING(LEVELING)) DEBUG_POS("zone border move", current_position);
|
if (DEBUGGING(LEVELING)) DEBUG_POS("zone border move", current_position);
|
||||||
#endif
|
#endif
|
||||||
@ -1710,7 +1710,7 @@ void do_blocking_move_to(const float &lx, const float &ly, const float &lz, cons
|
|||||||
|
|
||||||
if (lz > current_position[Z_AXIS]) { // raising?
|
if (lz > current_position[Z_AXIS]) { // raising?
|
||||||
destination[Z_AXIS] = lz;
|
destination[Z_AXIS] = lz;
|
||||||
prepare_uninterpolated_move_to_destination(); // set_current_to_destination
|
prepare_uninterpolated_move_to_destination(); // set_current_from_destination
|
||||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||||
if (DEBUGGING(LEVELING)) DEBUG_POS("z raise move", current_position);
|
if (DEBUGGING(LEVELING)) DEBUG_POS("z raise move", current_position);
|
||||||
#endif
|
#endif
|
||||||
@ -1718,14 +1718,14 @@ void do_blocking_move_to(const float &lx, const float &ly, const float &lz, cons
|
|||||||
|
|
||||||
destination[X_AXIS] = lx;
|
destination[X_AXIS] = lx;
|
||||||
destination[Y_AXIS] = ly;
|
destination[Y_AXIS] = ly;
|
||||||
prepare_move_to_destination(); // set_current_to_destination
|
prepare_move_to_destination(); // set_current_from_destination
|
||||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||||
if (DEBUGGING(LEVELING)) DEBUG_POS("xy move", current_position);
|
if (DEBUGGING(LEVELING)) DEBUG_POS("xy move", current_position);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (lz < current_position[Z_AXIS]) { // lowering?
|
if (lz < current_position[Z_AXIS]) { // lowering?
|
||||||
destination[Z_AXIS] = lz;
|
destination[Z_AXIS] = lz;
|
||||||
prepare_uninterpolated_move_to_destination(); // set_current_to_destination
|
prepare_uninterpolated_move_to_destination(); // set_current_from_destination
|
||||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||||
if (DEBUGGING(LEVELING)) DEBUG_POS("z lower move", current_position);
|
if (DEBUGGING(LEVELING)) DEBUG_POS("z lower move", current_position);
|
||||||
#endif
|
#endif
|
||||||
@ -1735,7 +1735,7 @@ void do_blocking_move_to(const float &lx, const float &ly, const float &lz, cons
|
|||||||
|
|
||||||
if (!position_is_reachable_xy(lx, ly)) return;
|
if (!position_is_reachable_xy(lx, ly)) return;
|
||||||
|
|
||||||
set_destination_to_current();
|
set_destination_from_current();
|
||||||
|
|
||||||
// If Z needs to raise, do it before moving XY
|
// If Z needs to raise, do it before moving XY
|
||||||
if (destination[Z_AXIS] < lz) {
|
if (destination[Z_AXIS] < lz) {
|
||||||
@ -3196,7 +3196,7 @@ static void homeaxis(const AxisEnum axis) {
|
|||||||
flow_percentage[active_extruder] = 100;
|
flow_percentage[active_extruder] = 100;
|
||||||
|
|
||||||
// The current position will be the destination for E and Z moves
|
// The current position will be the destination for E and Z moves
|
||||||
set_destination_to_current();
|
set_destination_from_current();
|
||||||
|
|
||||||
stepper.synchronize(); // Wait for all moves to finish
|
stepper.synchronize(); // Wait for all moves to finish
|
||||||
|
|
||||||
@ -3996,7 +3996,7 @@ inline void gcode_G28(const bool always_home_all) {
|
|||||||
homeZ = always_home_all || parser.seen('Z'),
|
homeZ = always_home_all || parser.seen('Z'),
|
||||||
home_all = (!homeX && !homeY && !homeZ) || (homeX && homeY && homeZ);
|
home_all = (!homeX && !homeY && !homeZ) || (homeX && homeY && homeZ);
|
||||||
|
|
||||||
set_destination_to_current();
|
set_destination_from_current();
|
||||||
|
|
||||||
#if Z_HOME_DIR > 0 // If homing away from BED do Z first
|
#if Z_HOME_DIR > 0 // If homing away from BED do Z first
|
||||||
|
|
||||||
@ -4204,7 +4204,7 @@ void home_all_axes() { gcode_G28(true); }
|
|||||||
set_bed_leveling_enabled(true);
|
set_bed_leveling_enabled(true);
|
||||||
#if ENABLED(MESH_G28_REST_ORIGIN)
|
#if ENABLED(MESH_G28_REST_ORIGIN)
|
||||||
current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS);
|
current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS);
|
||||||
set_destination_to_current();
|
set_destination_from_current();
|
||||||
line_to_destination(homing_feedrate(Z_AXIS));
|
line_to_destination(homing_feedrate(Z_AXIS));
|
||||||
stepper.synchronize();
|
stepper.synchronize();
|
||||||
#endif
|
#endif
|
||||||
@ -5818,7 +5818,7 @@ void home_all_axes() { gcode_G28(true); }
|
|||||||
|
|
||||||
#if ENABLED(PROBE_DOUBLE_TOUCH)
|
#if ENABLED(PROBE_DOUBLE_TOUCH)
|
||||||
// Move away by the retract distance
|
// Move away by the retract distance
|
||||||
set_destination_to_current();
|
set_destination_from_current();
|
||||||
LOOP_XYZ(i) destination[i] += retract_mm[i];
|
LOOP_XYZ(i) destination[i] += retract_mm[i];
|
||||||
endstops.enable(false);
|
endstops.enable(false);
|
||||||
prepare_move_to_destination();
|
prepare_move_to_destination();
|
||||||
@ -5906,7 +5906,7 @@ void home_all_axes() { gcode_G28(true); }
|
|||||||
#define _GET_MESH_Y(J) mbl.index_to_ypos[J]
|
#define _GET_MESH_Y(J) mbl.index_to_ypos[J]
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
set_destination_to_current();
|
set_destination_from_current();
|
||||||
if (hasI) destination[X_AXIS] = LOGICAL_X_POSITION(_GET_MESH_X(ix));
|
if (hasI) destination[X_AXIS] = LOGICAL_X_POSITION(_GET_MESH_X(ix));
|
||||||
if (hasJ) destination[Y_AXIS] = LOGICAL_Y_POSITION(_GET_MESH_Y(iy));
|
if (hasJ) destination[Y_AXIS] = LOGICAL_Y_POSITION(_GET_MESH_Y(iy));
|
||||||
if (parser.boolval('P')) {
|
if (parser.boolval('P')) {
|
||||||
@ -6249,7 +6249,7 @@ inline void gcode_M17() {
|
|||||||
|
|
||||||
if (retract) {
|
if (retract) {
|
||||||
// Initial retract before move to filament change position
|
// Initial retract before move to filament change position
|
||||||
set_destination_to_current();
|
set_destination_from_current();
|
||||||
destination[E_AXIS] += retract;
|
destination[E_AXIS] += retract;
|
||||||
RUNPLAN(PAUSE_PARK_RETRACT_FEEDRATE);
|
RUNPLAN(PAUSE_PARK_RETRACT_FEEDRATE);
|
||||||
stepper.synchronize();
|
stepper.synchronize();
|
||||||
@ -6271,7 +6271,7 @@ inline void gcode_M17() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Unload filament
|
// Unload filament
|
||||||
set_destination_to_current();
|
set_destination_from_current();
|
||||||
destination[E_AXIS] += unload_length;
|
destination[E_AXIS] += unload_length;
|
||||||
RUNPLAN(FILAMENT_CHANGE_UNLOAD_FEEDRATE);
|
RUNPLAN(FILAMENT_CHANGE_UNLOAD_FEEDRATE);
|
||||||
stepper.synchronize();
|
stepper.synchronize();
|
||||||
@ -6375,7 +6375,7 @@ inline void gcode_M17() {
|
|||||||
filament_change_beep(max_beep_count, true);
|
filament_change_beep(max_beep_count, true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
set_destination_to_current();
|
set_destination_from_current();
|
||||||
|
|
||||||
if (load_length != 0) {
|
if (load_length != 0) {
|
||||||
#if ENABLED(ULTIPANEL)
|
#if ENABLED(ULTIPANEL)
|
||||||
@ -10476,7 +10476,7 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Save current position to destination, for use later
|
// Save current position to destination, for use later
|
||||||
set_destination_to_current();
|
set_destination_from_current();
|
||||||
|
|
||||||
#if ENABLED(DUAL_X_CARRIAGE)
|
#if ENABLED(DUAL_X_CARRIAGE)
|
||||||
|
|
||||||
@ -12240,7 +12240,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
|
|||||||
if (cx1 == cx2 && cy1 == cy2) {
|
if (cx1 == cx2 && cy1 == cy2) {
|
||||||
// Start and end on same mesh square
|
// Start and end on same mesh square
|
||||||
line_to_destination(fr_mm_s);
|
line_to_destination(fr_mm_s);
|
||||||
set_current_to_destination();
|
set_current_from_destination();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -12267,7 +12267,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
|
|||||||
else {
|
else {
|
||||||
// Already split on a border
|
// Already split on a border
|
||||||
line_to_destination(fr_mm_s);
|
line_to_destination(fr_mm_s);
|
||||||
set_current_to_destination();
|
set_current_from_destination();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -12303,7 +12303,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
|
|||||||
if (cx1 == cx2 && cy1 == cy2) {
|
if (cx1 == cx2 && cy1 == cy2) {
|
||||||
// Start and end on same mesh square
|
// Start and end on same mesh square
|
||||||
line_to_destination(fr_mm_s);
|
line_to_destination(fr_mm_s);
|
||||||
set_current_to_destination();
|
set_current_from_destination();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -12330,7 +12330,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
|
|||||||
else {
|
else {
|
||||||
// Already split on a border
|
// Already split on a border
|
||||||
line_to_destination(fr_mm_s);
|
line_to_destination(fr_mm_s);
|
||||||
set_current_to_destination();
|
set_current_from_destination();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -12521,7 +12521,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
|
|||||||
// Skip it, but keep track of the current position
|
// Skip it, but keep track of the current position
|
||||||
// (so it can be used as the start of the next non-travel move)
|
// (so it can be used as the start of the next non-travel move)
|
||||||
if (delayed_move_time != 0xFFFFFFFFUL) {
|
if (delayed_move_time != 0xFFFFFFFFUL) {
|
||||||
set_current_to_destination();
|
set_current_from_destination();
|
||||||
NOLESS(raised_parked_position[Z_AXIS], destination[Z_AXIS]);
|
NOLESS(raised_parked_position[Z_AXIS], destination[Z_AXIS]);
|
||||||
delayed_move_time = millis();
|
delayed_move_time = millis();
|
||||||
return true;
|
return true;
|
||||||
@ -12627,7 +12627,7 @@ void prepare_move_to_destination() {
|
|||||||
#endif
|
#endif
|
||||||
) return;
|
) return;
|
||||||
|
|
||||||
set_current_to_destination();
|
set_current_from_destination();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLED(ARC_SUPPORT)
|
#if ENABLED(ARC_SUPPORT)
|
||||||
@ -12784,7 +12784,7 @@ void prepare_move_to_destination() {
|
|||||||
// As far as the parser is concerned, the position is now == target. In reality the
|
// As far as the parser is concerned, the position is now == target. In reality the
|
||||||
// motion control system might still be processing the action and the real tool position
|
// motion control system might still be processing the action and the real tool position
|
||||||
// in any intermediate location.
|
// in any intermediate location.
|
||||||
set_current_to_destination();
|
set_current_from_destination();
|
||||||
} // plan_arc
|
} // plan_arc
|
||||||
|
|
||||||
#endif // ARC_SUPPORT
|
#endif // ARC_SUPPORT
|
||||||
@ -12797,7 +12797,7 @@ void prepare_move_to_destination() {
|
|||||||
// As far as the parser is concerned, the position is now == destination. In reality the
|
// As far as the parser is concerned, the position is now == destination. In reality the
|
||||||
// motion control system might still be processing the action and the real tool position
|
// motion control system might still be processing the action and the real tool position
|
||||||
// in any intermediate location.
|
// in any intermediate location.
|
||||||
set_current_to_destination();
|
set_current_from_destination();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // BEZIER_CURVE_SUPPORT
|
#endif // BEZIER_CURVE_SUPPORT
|
||||||
@ -13321,7 +13321,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
|
|||||||
if (delayed_move_time && ELAPSED(ms, delayed_move_time + 1000UL) && IsRunning()) {
|
if (delayed_move_time && ELAPSED(ms, delayed_move_time + 1000UL) && IsRunning()) {
|
||||||
// travel moves have been received so enact them
|
// travel moves have been received so enact them
|
||||||
delayed_move_time = 0xFFFFFFFFUL; // force moves to be done
|
delayed_move_time = 0xFFFFFFFFUL; // force moves to be done
|
||||||
set_destination_to_current();
|
set_destination_from_current();
|
||||||
prepare_move_to_destination();
|
prepare_move_to_destination();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -33,9 +33,9 @@
|
|||||||
extern float destination[XYZE];
|
extern float destination[XYZE];
|
||||||
|
|
||||||
#if AVR_AT90USB1286_FAMILY // Teensyduino & Printrboard IDE extensions have compile errors without this
|
#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
|
#else
|
||||||
extern void set_current_to_destination();
|
extern void set_current_from_destination();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(DELTA)
|
#if ENABLED(DELTA)
|
||||||
@ -154,7 +154,7 @@
|
|||||||
// a reasonable correction would be.
|
// a reasonable correction would be.
|
||||||
|
|
||||||
planner._buffer_line(end[X_AXIS], end[Y_AXIS], end[Z_AXIS], end[E_AXIS], feed_rate, extruder);
|
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)
|
if (g26_debug_flag)
|
||||||
debug_current_and_destination(PSTR("out of bounds in ubl.line_to_destination()"));
|
debug_current_and_destination(PSTR("out of bounds in ubl.line_to_destination()"));
|
||||||
@ -202,7 +202,7 @@
|
|||||||
if (g26_debug_flag)
|
if (g26_debug_flag)
|
||||||
debug_current_and_destination(PSTR("FINAL_MOVE in ubl.line_to_destination()"));
|
debug_current_and_destination(PSTR("FINAL_MOVE in ubl.line_to_destination()"));
|
||||||
|
|
||||||
set_current_to_destination();
|
set_current_from_destination();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -314,7 +314,7 @@
|
|||||||
if (current_position[X_AXIS] != end[X_AXIS] || current_position[Y_AXIS] != end[Y_AXIS])
|
if (current_position[X_AXIS] != end[X_AXIS] || current_position[Y_AXIS] != end[Y_AXIS])
|
||||||
goto FINAL_MOVE;
|
goto FINAL_MOVE;
|
||||||
|
|
||||||
set_current_to_destination();
|
set_current_from_destination();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -375,7 +375,7 @@
|
|||||||
if (current_position[X_AXIS] != end[X_AXIS] || current_position[Y_AXIS] != end[Y_AXIS])
|
if (current_position[X_AXIS] != end[X_AXIS] || current_position[Y_AXIS] != end[Y_AXIS])
|
||||||
goto FINAL_MOVE;
|
goto FINAL_MOVE;
|
||||||
|
|
||||||
set_current_to_destination();
|
set_current_from_destination();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -469,7 +469,7 @@
|
|||||||
if (current_position[X_AXIS] != end[X_AXIS] || current_position[Y_AXIS] != end[Y_AXIS])
|
if (current_position[X_AXIS] != end[X_AXIS] || current_position[Y_AXIS] != end[Y_AXIS])
|
||||||
goto FINAL_MOVE;
|
goto FINAL_MOVE;
|
||||||
|
|
||||||
set_current_to_destination();
|
set_current_from_destination();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if UBL_DELTA
|
#if UBL_DELTA
|
||||||
@ -619,7 +619,7 @@
|
|||||||
|
|
||||||
} while (segments);
|
} 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
|
// Otherwise perform per-segment leveling
|
||||||
@ -700,7 +700,7 @@
|
|||||||
ubl_buffer_segment_raw( seg_rx, seg_ry, seg_rz + z_cxcy, seg_le, feedrate );
|
ubl_buffer_segment_raw( seg_rx, seg_ry, seg_rz + z_cxcy, seg_le, feedrate );
|
||||||
|
|
||||||
if (segments == 0 ) // done with last segment
|
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_rx += seg_dx;
|
||||||
seg_ry += seg_dy;
|
seg_ry += seg_dy;
|
||||||
|
@ -2794,7 +2794,7 @@ void kill_screen(const char* lcd_msg) {
|
|||||||
#if IS_KINEMATIC
|
#if IS_KINEMATIC
|
||||||
extern float feedrate_mm_s;
|
extern float feedrate_mm_s;
|
||||||
extern float destination[XYZE];
|
extern float destination[XYZE];
|
||||||
void set_destination_to_current();
|
void set_destination_from_current();
|
||||||
void prepare_move_to_destination();
|
void prepare_move_to_destination();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -2819,7 +2819,7 @@ void kill_screen(const char* lcd_msg) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Set movement on a single axis
|
// Set movement on a single axis
|
||||||
set_destination_to_current();
|
set_destination_from_current();
|
||||||
destination[manual_move_axis] += manual_move_offset;
|
destination[manual_move_axis] += manual_move_offset;
|
||||||
|
|
||||||
// Reset for the next move
|
// Reset for the next move
|
||||||
@ -2831,7 +2831,7 @@ void kill_screen(const char* lcd_msg) {
|
|||||||
// previous invocation is being blocked. Modifications to manual_move_offset shouldn't be made while
|
// previous invocation is being blocked. Modifications to manual_move_offset shouldn't be made while
|
||||||
// processing_manual_move is true or the planner will get out of sync.
|
// processing_manual_move is true or the planner will get out of sync.
|
||||||
processing_manual_move = true;
|
processing_manual_move = true;
|
||||||
prepare_move_to_destination(); // will call set_current_to_destination
|
prepare_move_to_destination(); // will call set_current_from_destination()
|
||||||
processing_manual_move = false;
|
processing_manual_move = false;
|
||||||
|
|
||||||
feedrate_mm_s = old_feedrate;
|
feedrate_mm_s = old_feedrate;
|
||||||
|
Loading…
Reference in New Issue
Block a user