Enable junction deviation by default (#15481)
This commit is contained in:
@ -117,10 +117,10 @@ void GcodeSuite::M204() {
|
||||
* Y = Max Y Jerk (units/sec^2)
|
||||
* Z = Max Z Jerk (units/sec^2)
|
||||
* E = Max E Jerk (units/sec^2)
|
||||
* J = Junction Deviation (mm) (Requires JUNCTION_DEVIATION)
|
||||
* J = Junction Deviation (mm) (If not using CLASSIC_JERK)
|
||||
*/
|
||||
void GcodeSuite::M205() {
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
#if DISABLED(CLASSIC_JERK)
|
||||
#define J_PARAM "J"
|
||||
#else
|
||||
#define J_PARAM
|
||||
@ -136,7 +136,7 @@ void GcodeSuite::M205() {
|
||||
if (parser.seen('B')) planner.settings.min_segment_time_us = parser.value_ulong();
|
||||
if (parser.seen('S')) planner.settings.min_feedrate_mm_s = parser.value_linear_units();
|
||||
if (parser.seen('T')) planner.settings.min_travel_feedrate_mm_s = parser.value_linear_units();
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
#if DISABLED(CLASSIC_JERK)
|
||||
if (parser.seen('J')) {
|
||||
const float junc_dev = parser.value_linear_units();
|
||||
if (WITHIN(junc_dev, 0.01f, 0.3f)) {
|
||||
@ -159,7 +159,7 @@ void GcodeSuite::M205() {
|
||||
SERIAL_ECHOLNPGM("WARNING! Low Z Jerk may lead to unwanted pauses.");
|
||||
#endif
|
||||
}
|
||||
#if !BOTH(JUNCTION_DEVIATION, LIN_ADVANCE)
|
||||
#if HAS_CLASSIC_E_JERK
|
||||
if (parser.seen('E')) planner.set_max_jerk(E_AXIS, parser.value_linear_units());
|
||||
#endif
|
||||
#endif
|
||||
|
@ -76,7 +76,7 @@ void GcodeSuite::M92() {
|
||||
const float value = parser.value_per_axis_units((AxisEnum)(E_AXIS_N(target_extruder)));
|
||||
if (value < 20) {
|
||||
float factor = planner.settings.axis_steps_per_mm[E_AXIS_N(target_extruder)] / value; // increase e constants if M92 E14 is given for netfab.
|
||||
#if HAS_CLASSIC_JERK && !BOTH(JUNCTION_DEVIATION, LIN_ADVANCE)
|
||||
#if HAS_CLASSIC_E_JERK
|
||||
planner.max_jerk.e *= factor;
|
||||
#endif
|
||||
planner.settings.max_feedrate_mm_s[E_AXIS_N(target_extruder)] *= factor;
|
||||
|
@ -564,3 +564,5 @@
|
||||
#define IS_RE_ARM_BOARD (MB(RAMPS_14_RE_ARM_EFB) || MB(RAMPS_14_RE_ARM_EEB) || MB(RAMPS_14_RE_ARM_EFF) || MB(RAMPS_14_RE_ARM_EEF) || MB(RAMPS_14_RE_ARM_SF))
|
||||
|
||||
#define HAS_SDCARD_CONNECTION EITHER(TARGET_LPC1768, ADAFRUIT_GRAND_CENTRAL_M4)
|
||||
|
||||
#define HAS_LINEAR_E_JERK (DISABLED(CLASSIC_JERK) && ENABLED(LIN_ADVANCE))
|
||||
|
@ -43,7 +43,8 @@
|
||||
#define NOT_A_PIN 0 // For PINS_DEBUGGING
|
||||
#endif
|
||||
|
||||
#define HAS_CLASSIC_JERK (IS_KINEMATIC || DISABLED(JUNCTION_DEVIATION))
|
||||
#define HAS_CLASSIC_JERK (ENABLED(CLASSIC_JERK) || IS_KINEMATIC)
|
||||
#define HAS_CLASSIC_E_JERK (HAS_CLASSIC_JERK && DISABLED(LIN_ADVANCE))
|
||||
|
||||
/**
|
||||
* Axis lengths and center
|
||||
|
@ -310,7 +310,7 @@
|
||||
#error "LEVEL_BED_CORNERS requires a LEVEL_CORNERS_INSET value. Please update your Configuration.h."
|
||||
#elif defined(BEZIER_JERK_CONTROL)
|
||||
#error "BEZIER_JERK_CONTROL is now S_CURVE_ACCELERATION. Please update your configuration."
|
||||
#elif defined(JUNCTION_DEVIATION_FACTOR)
|
||||
#elif DISABLED(CLASSIC_JERK) && defined(JUNCTION_DEVIATION_FACTOR)
|
||||
#error "JUNCTION_DEVIATION_FACTOR is now JUNCTION_DEVIATION_MM. Please update your configuration."
|
||||
#elif defined(JUNCTION_ACCELERATION_FACTOR)
|
||||
#error "JUNCTION_ACCELERATION_FACTOR is obsolete. Delete it from Configuration_adv.h."
|
||||
@ -404,6 +404,8 @@
|
||||
#error "(MIN|MAX)_PROBE_[XY] are now calculated at runtime. Please remove them from Configuration.h."
|
||||
#elif defined(Z_STEPPER_ALIGN_X) || defined(Z_STEPPER_ALIGN_X)
|
||||
#error "Z_STEPPER_ALIGN_X and Z_STEPPER_ALIGN_Y are now combined as Z_STEPPER_ALIGN_XY. Please update your Configuration_adv.h."
|
||||
#elif defined(JUNCTION_DEVIATION)
|
||||
#error "JUNCTION_DEVIATION is no longer required. (See CLASSIC_JERK). Please remove it from Configuration.h."
|
||||
#endif
|
||||
|
||||
#define BOARD_MKS_13 -1000
|
||||
@ -1040,10 +1042,10 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Junction deviation is not compatible with kinematic systems.
|
||||
* Junction deviation is incompatible with kinematic systems.
|
||||
*/
|
||||
#if ENABLED(JUNCTION_DEVIATION) && IS_KINEMATIC
|
||||
#error "Junction deviation is only compatible with Cartesians."
|
||||
#if DISABLED(CLASSIC_JERK) && IS_KINEMATIC
|
||||
#error "CLASSIC_JERK is required for DELTA and SCARA."
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -1270,7 +1272,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#endif
|
||||
|
||||
#if HAS_MESH
|
||||
#if DISABLED(JUNCTION_DEVIATION)
|
||||
#if HAS_CLASSIC_JERK
|
||||
static_assert(DEFAULT_ZJERK > 0.1, "Low DEFAULT_ZJERK values are incompatible with mesh-based leveling.");
|
||||
#endif
|
||||
#elif ENABLED(G26_MESH_VALIDATION)
|
||||
|
@ -82,7 +82,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
|
||||
.tag(10).button( BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(RESTORE_DEFAULTS))
|
||||
.tag(5) .button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXT_F(VELOCITY))
|
||||
.tag(6) .button( BTN_POS(2,3), BTN_SIZE(1,1), GET_TEXT_F(ACCELERATION))
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
#if DISABLED(CLASSIC_JERK)
|
||||
.tag(7) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXT_F(JUNC_DEVIATION))
|
||||
#else
|
||||
.tag(7) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXT_F(JERK))
|
||||
@ -135,7 +135,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
|
||||
.tag(12).button( BTN_POS(3,4), BTN_SIZE(1,1), GET_TEXT_F(ENDSTOPS))
|
||||
.tag(5) .button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXT_F(VELOCITY))
|
||||
.tag(6) .button( BTN_POS(2,3), BTN_SIZE(1,1), GET_TEXT_F(ACCELERATION))
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
#if DISABLED(CLASSIC_JERK)
|
||||
.tag(7) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXT_F(JUNC_DEVIATION))
|
||||
#else
|
||||
.tag(7) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXT_F(JERK))
|
||||
@ -163,7 +163,7 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) {
|
||||
case 5: GOTO_SCREEN(MaxVelocityScreen); break;
|
||||
case 6: GOTO_SCREEN(DefaultAccelerationScreen); break;
|
||||
case 7:
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
#if DISABLED(CLASSIC_JERK)
|
||||
GOTO_SCREEN(JunctionDeviationScreen);
|
||||
#else
|
||||
GOTO_SCREEN(JerkScreen);
|
||||
|
@ -68,7 +68,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
|
||||
.tag(7) .button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXT_F(STEPS_PER_MM))
|
||||
.tag(8) .button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXT_F(VELOCITY))
|
||||
.tag(9) .button( BTN_POS(2,3), BTN_SIZE(1,1), GET_TEXT_F(ACCELERATION))
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
#if DISABLED(CLASSIC_JERK)
|
||||
.tag(10) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXT_F(JUNC_DEVIATION))
|
||||
#else
|
||||
.tag(10) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXT_F(JERK))
|
||||
@ -113,7 +113,7 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) {
|
||||
case 8: GOTO_SCREEN(MaxVelocityScreen); break;
|
||||
case 9: GOTO_SCREEN(DefaultAccelerationScreen); break;
|
||||
case 10:
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
#if DISABLED(CLASSIC_JERK)
|
||||
GOTO_SCREEN(JunctionDeviationScreen);
|
||||
#else
|
||||
GOTO_SCREEN(JerkScreen);
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && DISABLED(JUNCTION_DEVIATION)
|
||||
#if BOTH(LULZBOT_TOUCH_UI, CLASSIC_JERK)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
@ -62,4 +62,4 @@ bool JerkScreen::onTouchHeld(uint8_t tag) {
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
||||
#endif // LULZBOT_TOUCH_UI && CLASSIC_JERK
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if BOTH(LULZBOT_TOUCH_UI, JUNCTION_DEVIATION)
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && DISABLED(CLASSIC_JERK)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
@ -51,4 +51,4 @@ bool JunctionDeviationScreen::onTouchHeld(uint8_t tag) {
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
||||
#endif // LULZBOT_TOUCH_UI && !CLASSIC_JERK
|
||||
|
@ -75,7 +75,7 @@ SCREEN_TABLE {
|
||||
DECL_SCREEN(MaxVelocityScreen),
|
||||
DECL_SCREEN(MaxAccelerationScreen),
|
||||
DECL_SCREEN(DefaultAccelerationScreen),
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
#if DISABLED(CLASSIC_JERK)
|
||||
DECL_SCREEN(JunctionDeviationScreen),
|
||||
#else
|
||||
DECL_SCREEN(JerkScreen),
|
||||
|
@ -55,7 +55,7 @@ enum {
|
||||
MAX_VELOCITY_SCREEN_CACHE,
|
||||
MAX_ACCELERATION_SCREEN_CACHE,
|
||||
DEFAULT_ACCELERATION_SCREEN_CACHE,
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
#if DISABLED(CLASSIC_JERK)
|
||||
JUNC_DEV_SCREEN_CACHE,
|
||||
#else
|
||||
JERK_SCREEN_CACHE,
|
||||
@ -503,7 +503,7 @@ class DefaultAccelerationScreen : public BaseNumericAdjustmentScreen, public Cac
|
||||
static bool onTouchHeld(uint8_t tag);
|
||||
};
|
||||
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
#if DISABLED(CLASSIC_JERK)
|
||||
class JunctionDeviationScreen : public BaseNumericAdjustmentScreen, public CachedScreen<JUNC_DEV_SCREEN_CACHE> {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
|
@ -622,7 +622,7 @@ namespace ExtUI {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
#if DISABLED(CLASSIC_JERK)
|
||||
|
||||
float getJunctionDeviation_mm() {
|
||||
return planner.junction_deviation_mm;
|
||||
|
@ -179,7 +179,7 @@ namespace ExtUI {
|
||||
void setLinearAdvance_mm_mm_s(const float, const extruder_t);
|
||||
#endif
|
||||
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
#if DISABLED(CLASSIC_JERK)
|
||||
float getJunctionDeviation_mm();
|
||||
void setJunctionDeviation_mm(const float);
|
||||
#else
|
||||
|
@ -486,7 +486,7 @@ void menu_backlash();
|
||||
START_MENU();
|
||||
BACK_ITEM(MSG_ADVANCED_SETTINGS);
|
||||
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
#if DISABLED(CLASSIC_JERK)
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
EDIT_ITEM(float43, MSG_JUNCTION_DEVIATION, &planner.junction_deviation_mm, 0.01f, 0.3f, planner.recalculate_max_e_jerk);
|
||||
#else
|
||||
@ -511,7 +511,7 @@ void menu_backlash();
|
||||
#else
|
||||
EDIT_ITEM_FAST(float52sign, MSG_VC_JERK, &planner.max_jerk.c, 0.1f, max_jerk_edit.c);
|
||||
#endif
|
||||
#if !BOTH(JUNCTION_DEVIATION, LIN_ADVANCE)
|
||||
#if HAS_CLASSIC_E_JERK
|
||||
EDIT_ITEM_FAST(float52sign, MSG_VE_JERK, &planner.max_jerk.e, 0.1f, max_jerk_edit.e);
|
||||
#endif
|
||||
#endif
|
||||
|
@ -398,7 +398,7 @@ void MarlinSettings::postprocess() {
|
||||
fwretract.refresh_autoretract();
|
||||
#endif
|
||||
|
||||
#if BOTH(JUNCTION_DEVIATION, LIN_ADVANCE)
|
||||
#if HAS_LINEAR_E_JERK
|
||||
planner.recalculate_max_e_jerk();
|
||||
#endif
|
||||
|
||||
@ -516,7 +516,7 @@ void MarlinSettings::postprocess() {
|
||||
|
||||
#if HAS_CLASSIC_JERK
|
||||
EEPROM_WRITE(planner.max_jerk);
|
||||
#if BOTH(JUNCTION_DEVIATION, LIN_ADVANCE)
|
||||
#if HAS_LINEAR_E_JERK
|
||||
dummy = float(DEFAULT_EJERK);
|
||||
EEPROM_WRITE(dummy);
|
||||
#endif
|
||||
@ -1316,7 +1316,7 @@ void MarlinSettings::postprocess() {
|
||||
|
||||
#if HAS_CLASSIC_JERK
|
||||
EEPROM_READ(planner.max_jerk);
|
||||
#if BOTH(JUNCTION_DEVIATION, LIN_ADVANCE)
|
||||
#if HAS_LINEAR_E_JERK
|
||||
EEPROM_READ(dummy);
|
||||
#endif
|
||||
#else
|
||||
@ -2230,7 +2230,7 @@ void MarlinSettings::reset() {
|
||||
#define DEFAULT_ZJERK 0
|
||||
#endif
|
||||
planner.max_jerk.set(DEFAULT_XJERK, DEFAULT_YJERK, DEFAULT_ZJERK);
|
||||
#if !BOTH(JUNCTION_DEVIATION, LIN_ADVANCE)
|
||||
#if HAS_CLASSIC_E_JERK
|
||||
planner.max_jerk.e = DEFAULT_EJERK;
|
||||
#endif
|
||||
#endif
|
||||
@ -2749,7 +2749,7 @@ void MarlinSettings::reset() {
|
||||
#endif
|
||||
#if HAS_CLASSIC_JERK
|
||||
SERIAL_ECHOPGM(" X<max_x_jerk> Y<max_y_jerk> Z<max_z_jerk>");
|
||||
#if !BOTH(JUNCTION_DEVIATION, LIN_ADVANCE)
|
||||
#if HAS_CLASSIC_E_JERK
|
||||
SERIAL_ECHOPGM(" E<max_e_jerk>");
|
||||
#endif
|
||||
#endif
|
||||
@ -2767,7 +2767,7 @@ void MarlinSettings::reset() {
|
||||
, " X", LINEAR_UNIT(planner.max_jerk.x)
|
||||
, " Y", LINEAR_UNIT(planner.max_jerk.y)
|
||||
, " Z", LINEAR_UNIT(planner.max_jerk.z)
|
||||
#if !BOTH(JUNCTION_DEVIATION, LIN_ADVANCE)
|
||||
#if HAS_CLASSIC_E_JERK
|
||||
, " E", LINEAR_UNIT(planner.max_jerk.e)
|
||||
#endif
|
||||
#endif
|
||||
|
@ -1287,13 +1287,13 @@ void do_homing_move(const AxisEnum axis, const float distance, const feedRate_t
|
||||
planner.set_machine_position_mm(target);
|
||||
target[axis] = distance;
|
||||
|
||||
#if IS_KINEMATIC && ENABLED(JUNCTION_DEVIATION)
|
||||
#if IS_KINEMATIC && DISABLED(CLASSIC_JERK)
|
||||
const xyze_float_t delta_mm_cart{0};
|
||||
#endif
|
||||
|
||||
// Set delta/cartesian axes directly
|
||||
planner.buffer_segment(target
|
||||
#if IS_KINEMATIC && ENABLED(JUNCTION_DEVIATION)
|
||||
#if IS_KINEMATIC && DISABLED(CLASSIC_JERK)
|
||||
, delta_mm_cart
|
||||
#endif
|
||||
, real_fr_mm_s, active_extruder
|
||||
|
@ -125,7 +125,7 @@ uint32_t Planner::max_acceleration_steps_per_s2[XYZE_N]; // (steps/s^2) Derived
|
||||
|
||||
float Planner::steps_to_mm[XYZE_N]; // (mm) Millimeters per step
|
||||
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
#if DISABLED(CLASSIC_JERK)
|
||||
float Planner::junction_deviation_mm; // (mm) M205 J
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
#if ENABLED(DISTINCT_E_FACTORS)
|
||||
@ -136,7 +136,7 @@ float Planner::steps_to_mm[XYZE_N]; // (mm) Millimeters per step
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_CLASSIC_JERK
|
||||
#if BOTH(JUNCTION_DEVIATION, LIN_ADVANCE)
|
||||
#if HAS_LINEAR_E_JERK
|
||||
xyz_pos_t Planner::max_jerk; // (mm/s^2) M205 XYZ - The largest speed change requiring no acceleration.
|
||||
#else
|
||||
xyze_pos_t Planner::max_jerk; // (mm/s^2) M205 XYZE - The largest speed change requiring no acceleration.
|
||||
@ -1564,7 +1564,7 @@ bool Planner::_buffer_steps(const xyze_long_t &target
|
||||
#if HAS_POSITION_FLOAT
|
||||
, const xyze_pos_t &target_float
|
||||
#endif
|
||||
#if IS_KINEMATIC && ENABLED(JUNCTION_DEVIATION)
|
||||
#if IS_KINEMATIC && DISABLED(CLASSIC_JERK)
|
||||
, const xyze_float_t &delta_mm_cart
|
||||
#endif
|
||||
, feedRate_t fr_mm_s, const uint8_t extruder, const float &millimeters
|
||||
@ -1582,7 +1582,7 @@ bool Planner::_buffer_steps(const xyze_long_t &target
|
||||
#if HAS_POSITION_FLOAT
|
||||
, target_float
|
||||
#endif
|
||||
#if IS_KINEMATIC && ENABLED(JUNCTION_DEVIATION)
|
||||
#if IS_KINEMATIC && DISABLED(CLASSIC_JERK)
|
||||
, delta_mm_cart
|
||||
#endif
|
||||
, fr_mm_s, extruder, millimeters
|
||||
@ -1628,7 +1628,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
||||
#if HAS_POSITION_FLOAT
|
||||
, const xyze_pos_t &target_float
|
||||
#endif
|
||||
#if IS_KINEMATIC && ENABLED(JUNCTION_DEVIATION)
|
||||
#if IS_KINEMATIC && DISABLED(CLASSIC_JERK)
|
||||
, const xyze_float_t &delta_mm_cart
|
||||
#endif
|
||||
, feedRate_t fr_mm_s, const uint8_t extruder, const float &millimeters/*=0.0*/
|
||||
@ -2164,7 +2164,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
||||
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
#if DISABLED(CLASSIC_JERK)
|
||||
#if ENABLED(DISTINCT_E_FACTORS)
|
||||
#define MAX_E_JERK max_e_jerk[extruder]
|
||||
#else
|
||||
@ -2252,7 +2252,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
||||
|
||||
float vmax_junction_sqr; // Initial limit on the segment entry velocity (mm/s)^2
|
||||
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
#if DISABLED(CLASSIC_JERK)
|
||||
/**
|
||||
* Compute maximum allowable entry speed at junction by centripetal acceleration approximation.
|
||||
* Let a circle be tangent to both previous and current path line segments, where the junction
|
||||
@ -2291,7 +2291,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
||||
static xyze_float_t prev_unit_vec;
|
||||
|
||||
xyze_float_t unit_vec =
|
||||
#if IS_KINEMATIC && ENABLED(JUNCTION_DEVIATION)
|
||||
#if IS_KINEMATIC && DISABLED(CLASSIC_JERK)
|
||||
delta_mm_cart
|
||||
#else
|
||||
{ delta_mm.x, delta_mm.y, delta_mm.z, delta_mm.e }
|
||||
@ -2299,7 +2299,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
||||
;
|
||||
unit_vec *= inverse_millimeters;
|
||||
|
||||
#if IS_CORE && ENABLED(JUNCTION_DEVIATION)
|
||||
#if IS_CORE && DISABLED(CLASSIC_JERK)
|
||||
/**
|
||||
* On CoreXY the length of the vector [A,B] is SQRT(2) times the length of the head movement vector [X,Y].
|
||||
* So taking Z and E into account, we cannot scale to a unit vector with "inverse_millimeters".
|
||||
@ -2369,7 +2369,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
||||
float safe_speed = nominal_speed;
|
||||
|
||||
uint8_t limited = 0;
|
||||
#if BOTH(JUNCTION_DEVIATION, LIN_ADVANCE)
|
||||
#if HAS_LINEAR_E_JERK
|
||||
LOOP_XYZ(i)
|
||||
#else
|
||||
LOOP_XYZE(i)
|
||||
@ -2406,7 +2406,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
||||
|
||||
// Now limit the jerk in all axes.
|
||||
const float smaller_speed_factor = vmax_junction / previous_nominal_speed;
|
||||
#if BOTH(JUNCTION_DEVIATION, LIN_ADVANCE)
|
||||
#if HAS_LINEAR_E_JERK
|
||||
LOOP_XYZ(axis)
|
||||
#else
|
||||
LOOP_XYZE(axis)
|
||||
@ -2444,7 +2444,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
||||
|
||||
previous_safe_speed = safe_speed;
|
||||
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
#if DISABLED(CLASSIC_JERK)
|
||||
vmax_junction_sqr = _MIN(vmax_junction_sqr, sq(vmax_junction));
|
||||
#else
|
||||
vmax_junction_sqr = sq(vmax_junction);
|
||||
@ -2538,7 +2538,7 @@ void Planner::buffer_sync_block() {
|
||||
* millimeters - the length of the movement, if known
|
||||
*/
|
||||
bool Planner::buffer_segment(const float &a, const float &b, const float &c, const float &e
|
||||
#if IS_KINEMATIC && ENABLED(JUNCTION_DEVIATION)
|
||||
#if IS_KINEMATIC && DISABLED(CLASSIC_JERK)
|
||||
, const xyze_float_t &delta_mm_cart
|
||||
#endif
|
||||
, const feedRate_t &fr_mm_s, const uint8_t extruder, const float &millimeters/*=0.0*/
|
||||
@ -2610,7 +2610,7 @@ bool Planner::buffer_segment(const float &a, const float &b, const float &c, con
|
||||
#if HAS_POSITION_FLOAT
|
||||
, target_float
|
||||
#endif
|
||||
#if IS_KINEMATIC && ENABLED(JUNCTION_DEVIATION)
|
||||
#if IS_KINEMATIC && DISABLED(CLASSIC_JERK)
|
||||
, delta_mm_cart
|
||||
#endif
|
||||
, fr_mm_s, extruder, millimeters
|
||||
@ -2644,7 +2644,7 @@ bool Planner::buffer_line(const float &rx, const float &ry, const float &rz, con
|
||||
|
||||
#if IS_KINEMATIC
|
||||
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
#if DISABLED(CLASSIC_JERK)
|
||||
const xyze_pos_t delta_mm_cart = {
|
||||
rx - position_cart.x, ry - position_cart.y,
|
||||
rz - position_cart.z, e - position_cart.e
|
||||
@ -2668,7 +2668,7 @@ bool Planner::buffer_line(const float &rx, const float &ry, const float &rz, con
|
||||
const feedRate_t feedrate = fr_mm_s;
|
||||
#endif
|
||||
if (buffer_segment(delta.a, delta.b, delta.c, machine.e
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
#if DISABLED(CLASSIC_JERK)
|
||||
, delta_mm_cart
|
||||
#endif
|
||||
, feedrate, extruder, mm
|
||||
@ -2769,7 +2769,7 @@ void Planner::reset_acceleration_rates() {
|
||||
if (AXIS_CONDITION) NOLESS(highest_rate, max_acceleration_steps_per_s2[i]);
|
||||
}
|
||||
cutoff_long = 4294967295UL / highest_rate; // 0xFFFFFFFFUL
|
||||
#if BOTH(JUNCTION_DEVIATION, LIN_ADVANCE)
|
||||
#if HAS_LINEAR_E_JERK
|
||||
recalculate_max_e_jerk();
|
||||
#endif
|
||||
}
|
||||
|
@ -245,7 +245,7 @@ class Planner {
|
||||
static uint32_t max_acceleration_steps_per_s2[XYZE_N]; // (steps/s^2) Derived from mm_per_s2
|
||||
static float steps_to_mm[XYZE_N]; // Millimeters per step
|
||||
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
#if DISABLED(CLASSIC_JERK)
|
||||
static float junction_deviation_mm; // (mm) M205 J
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
static float max_e_jerk // Calculated from junction_deviation_mm
|
||||
@ -257,7 +257,7 @@ class Planner {
|
||||
#endif
|
||||
|
||||
#if HAS_CLASSIC_JERK
|
||||
#if BOTH(JUNCTION_DEVIATION, LIN_ADVANCE)
|
||||
#if HAS_LINEAR_E_JERK
|
||||
static xyz_pos_t max_jerk; // (mm/s^2) M205 XYZ - The largest speed change requiring no acceleration.
|
||||
#else
|
||||
static xyze_pos_t max_jerk; // (mm/s^2) M205 XYZE - The largest speed change requiring no acceleration.
|
||||
@ -579,7 +579,7 @@ class Planner {
|
||||
#if HAS_POSITION_FLOAT
|
||||
, const xyze_pos_t &target_float
|
||||
#endif
|
||||
#if IS_KINEMATIC && ENABLED(JUNCTION_DEVIATION)
|
||||
#if IS_KINEMATIC && DISABLED(CLASSIC_JERK)
|
||||
, const xyze_float_t &delta_mm_cart
|
||||
#endif
|
||||
, feedRate_t fr_mm_s, const uint8_t extruder, const float &millimeters=0.0
|
||||
@ -602,7 +602,7 @@ class Planner {
|
||||
#if HAS_POSITION_FLOAT
|
||||
, const xyze_pos_t &target_float
|
||||
#endif
|
||||
#if IS_KINEMATIC && ENABLED(JUNCTION_DEVIATION)
|
||||
#if IS_KINEMATIC && DISABLED(CLASSIC_JERK)
|
||||
, const xyze_float_t &delta_mm_cart
|
||||
#endif
|
||||
, feedRate_t fr_mm_s, const uint8_t extruder, const float &millimeters=0.0
|
||||
@ -634,20 +634,20 @@ class Planner {
|
||||
* millimeters - the length of the movement, if known
|
||||
*/
|
||||
static bool buffer_segment(const float &a, const float &b, const float &c, const float &e
|
||||
#if IS_KINEMATIC && ENABLED(JUNCTION_DEVIATION)
|
||||
#if IS_KINEMATIC && DISABLED(CLASSIC_JERK)
|
||||
, const xyze_float_t &delta_mm_cart
|
||||
#endif
|
||||
, const feedRate_t &fr_mm_s, const uint8_t extruder, const float &millimeters=0.0
|
||||
);
|
||||
|
||||
FORCE_INLINE static bool buffer_segment(abce_pos_t &abce
|
||||
#if IS_KINEMATIC && ENABLED(JUNCTION_DEVIATION)
|
||||
#if IS_KINEMATIC && DISABLED(CLASSIC_JERK)
|
||||
, const xyze_float_t &delta_mm_cart
|
||||
#endif
|
||||
, const feedRate_t &fr_mm_s, const uint8_t extruder, const float &millimeters=0.0
|
||||
) {
|
||||
return buffer_segment(abce.a, abce.b, abce.c, abce.e
|
||||
#if IS_KINEMATIC && ENABLED(JUNCTION_DEVIATION)
|
||||
#if IS_KINEMATIC && DISABLED(CLASSIC_JERK)
|
||||
, delta_mm_cart
|
||||
#endif
|
||||
, fr_mm_s, extruder, millimeters);
|
||||
@ -865,7 +865,7 @@ class Planner {
|
||||
static void autotemp_M104_M109();
|
||||
#endif
|
||||
|
||||
#if BOTH(JUNCTION_DEVIATION, LIN_ADVANCE)
|
||||
#if HAS_LINEAR_E_JERK
|
||||
FORCE_INLINE static void recalculate_max_e_jerk() {
|
||||
#define GET_MAX_E_JERK(N) SQRT(SQRT(0.5) * junction_deviation_mm * (N) * RECIPROCAL(1.0 - SQRT(0.5)))
|
||||
#if ENABLED(DISTINCT_E_FACTORS)
|
||||
@ -937,7 +937,7 @@ class Planner {
|
||||
|
||||
static void recalculate();
|
||||
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
#if DISABLED(CLASSIC_JERK)
|
||||
|
||||
FORCE_INLINE static void normalize_junction_vector(xyze_float_t &vector) {
|
||||
float magnitude_sq = 0;
|
||||
@ -952,7 +952,7 @@ class Planner {
|
||||
return limit_value;
|
||||
}
|
||||
|
||||
#endif // JUNCTION_DEVIATION
|
||||
#endif // !CLASSIC_JERK
|
||||
};
|
||||
|
||||
#define PLANNER_XY_FEEDRATE() (_MIN(planner.settings.max_feedrate_mm_s[X_AXIS], planner.settings.max_feedrate_mm_s[Y_AXIS]))
|
||||
|
Reference in New Issue
Block a user