Skip to content

Commit

Permalink
Merge pull request #31 from bilsef/my6axis_PR1
Browse files Browse the repository at this point in the history
Fixes for 6 axis
  • Loading branch information
DerAndere1 authored Sep 18, 2020
2 parents 52a013f + 09bb7ef commit cbc9394
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 62 deletions.
18 changes: 9 additions & 9 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -833,18 +833,18 @@
* Override with M92
* X, Y, Z, [I ,[J ,[K ,]]] E0 [, E1[, E2...]]
*/
#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 4000, 500 }
#define DEFAULT_AXIS_STEPS_PER_UNIT {LIST_N(LINEAR_AXES, 80, 80, 4000, 80, 80, 80), 500}

/**
* Default Max Feed Rate (mm/s)
* Override with M203
* X, Y, Z, [I ,[J ,[K ,]]] E0 [, E1[, E2...]]
*/
#define DEFAULT_MAX_FEEDRATE { 300, 300, 5, 25 }
#define DEFAULT_MAX_FEEDRATE {LIST_N(LINEAR_AXES, 300, 300, 5, 300, 300, 300), 25 }

//#define LIMITED_MAX_FR_EDITING // Limit edit via M203 or LCD to DEFAULT_MAX_FEEDRATE * 2
#if ENABLED(LIMITED_MAX_FR_EDITING)
#define MAX_FEEDRATE_EDIT_VALUES { 600, 600, 10, 50 } // ...or, set your own edit limits
#define MAX_FEEDRATE_EDIT_VALUES {LIST_N(LINEAR_AXES, 600, 600, 10, 600, 600, 600), 50 } // ...or, set your own edit limits
#endif

/**
Expand All @@ -853,11 +853,11 @@
* Override with M201
* X, Y, Z, [I ,[J ,[K ,]]] E0 [, E1[, E2...]]
*/
#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 10000 }
#define DEFAULT_MAX_ACCELERATION {LIST_N(LINEAR_AXES, 3000, 3000, 100, 3000, 3000, 3000), 10000 }

//#define LIMITED_MAX_ACCEL_EDITING // Limit edit via M201 or LCD to DEFAULT_MAX_ACCELERATION * 2
#if ENABLED(LIMITED_MAX_ACCEL_EDITING)
#define MAX_ACCEL_EDIT_VALUES { 6000, 6000, 200, 20000 } // ...or, set your own edit limits
#define MAX_ACCEL_EDIT_VALUES {LIST_N(LINEAR_AXES, 6000, 6000, 200, 6000, 6000, 6000), 20000 } // ...or, set your own edit limits
#endif

/**
Expand Down Expand Up @@ -885,15 +885,15 @@
#define DEFAULT_XJERK 10.0
#define DEFAULT_YJERK 10.0
#define DEFAULT_ZJERK 0.3
//#define DEFAULT_IJERK 0.3
//#define DEFAULT_JJERK 0.3
//#define DEFAULT_KJERK 0.3
#define DEFAULT_IJERK 10.0
#define DEFAULT_JJERK 10.0
#define DEFAULT_KJERK 10.0

//#define TRAVEL_EXTRA_XYJERK 0.0 // Additional jerk allowance for all travel moves

//#define LIMITED_JERK_EDITING // Limit edit via M205 or LCD to DEFAULT_aJERK * 2
#if ENABLED(LIMITED_JERK_EDITING)
#define MAX_JERK_EDIT_VALUES { 20, 20, 0.6, 10 } // ...or, set your own edit limits
#define MAX_JERK_EDIT_VALUES {LIST_N(LINEAR_AXES, 20, 20, 0.6, 20, 20, 20), 10 } // ...or, set your own edit limits
#endif
#endif

Expand Down
30 changes: 15 additions & 15 deletions Marlin/src/core/language.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,26 +208,26 @@

#if LINEAR_AXES >= 6
#if AXIS6_NAME == 'A'
#define STR_J_MIN "a_min"
#define STR_J_MAX "a_max"
#define STR_K_MIN "a_min"
#define STR_K_MAX "a_max"
#elif AXIS6_NAME == 'B'
#define STR_J_MIN "b_min"
#define STR_J_MAX "b_max"
#define STR_K_MIN "b_min"
#define STR_K_MAX "b_max"
#elif AXIS6_NAME == 'C'
#define STR_J_MIN "c_min"
#define STR_J_MAX "c_max"
#define STR_K_MIN "c_min"
#define STR_K_MAX "c_max"
#elif AXIS6_NAME == 'U'
#define STR_J_MIN "u_min"
#define STR_J_MAX "u_max"
#define STR_K_MIN "u_min"
#define STR_K_MAX "u_max"
#elif AXIS6_NAME == 'V'
#define STR_J_MIN "v_min"
#define STR_J_MAX "v_max"
#define STR_K_MIN "v_min"
#define STR_K_MAX "v_max"
#elif AXIS6_NAME == 'W'
#define STR_J_MIN "w_min"
#define STR_J_MAX "w_max"
#define STR_K_MIN "w_min"
#define STR_K_MAX "w_max"
#else
#define STR_J_MIN "j_min"
#define STR_J_MAX "j_max"
#define STR_K_MIN "k_min"
#define STR_K_MAX "k_max"
#endif
#endif

Expand Down Expand Up @@ -411,7 +411,7 @@
#elif AXIS6_NAME == 'W'
#define AXIS6_STR "W"
#else
#define AXIS6_STR "J"
#define AXIS6_STR "K"
#endif
#else
#define AXIS6_STR ""
Expand Down
28 changes: 14 additions & 14 deletions Marlin/src/core/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ struct XYZval {
FI XYZval<T> operator* (const XYZEval<T> &rs) { XYZval<T> ls = *this; ls.x *= rs.x; ls.y *= rs.y; ls.z *= rs.z; ls.i *= rs.i; ls.j *= rs.j; ls.k *= rs.k; return ls; }
FI XYZval<T> operator/ (const XYZEval<T> &rs) const { XYZval<T> ls = *this; ls.x /= rs.x; ls.y /= rs.y; ls.z /= rs.z; ls.i /= rs.i; ls.j /= rs.j; ls.k /= rs.k; return ls; }
FI XYZval<T> operator/ (const XYZEval<T> &rs) { XYZval<T> ls = *this; ls.x /= rs.x; ls.y /= rs.y; ls.z /= rs.z; ls.i /= rs.i; ls.j /= rs.j; ls.k /= rs.k; return ls; }
FI XYZval<T> operator* (const float &v) const { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; ls.x *= v; ls.j *= v; ls.k *= v; return ls; } //TODO: Test if ls.z = v or ls.z = z is correct
FI XYZval<T> operator* (const float &v) const { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; ls.i *= v; ls.j *= v; ls.k *= v; return ls; } //TODO: Test if ls.z = v or ls.z = z is correct
FI XYZval<T> operator* (const float &v) { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; ls.i *= v; ls.j *= v; ls.k *= v; return ls; }
FI XYZval<T> operator* (const int &v) const { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; ls.i *= v; ls.j *= v; ls.k *= v; return ls; }
FI XYZval<T> operator* (const int &v) { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; ls.i *= v; ls.j *= v; ls.k *= v; return ls; }
Expand Down Expand Up @@ -431,14 +431,14 @@ struct XYZEval {
FI void set(const T px, const T py, const T pz, const T pi) { x = px; y = py; z = pz; i = pi; }
FI void set(const T px, const T py, const T pz, const T pi, const T pj) { x = px; y = py; z = pz; i = pi; j = pj; }
FI void set(const T px, const T py, const T pz, const T pi, const T pj, const T pk) { x = px; y = py; z = pz; i = pi; j = pj; k = pk; }
FI void set(const T px, const T py, const T pz, const T pi, const T pj, const T pk, const T pe) { x = px; y = py; z = pz; e = pe; }
FI void set(const T px, const T py, const T pz, const T pi, const T pj, const T pk, const T pe) { x = px; y = py; z = pz; i = pi; j = pj; k = pk; e = pe; }
FI void set(const XYval<T> pxy) { x = pxy.x; y = pxy.y; }
FI void set(const XYval<T> pxy, const T pz) { x = pxy.x; y = pxy.y; z = pz; }
FI void set(const XYval<T> pxy, const T pz, const T pi) { x = pxy.x; y = pxy.y; z = pz; i = pi; }
FI void set(const XYval<T> pxy, const T pz, const T pi, const T pj) { x = pxy.x; y = pxy.y; z = pz; i = pi; j = pj; }
FI void set(const XYval<T> pxy, const T pz, const T pi, const T pj, const T pk) { x = pxy.x; y = pxy.y; z = pz; i = pi; j = pj; k = pk; }
FI void set(const XYZval<T> pxyz) { x = pxyz.x; y = pxyz.y; z = pxyz.z; i = pxyz.i; j = pxyz.j; k = pxyz.k; }
FI void set(const XYval<T> pxy, const T pz, const T pe) { x = pxy.x; y = pxy.y; z = pz; e = pe; }
FI void set(const XYval<T> pxy, const T pz, const T pi, const T pe) { x = pxy.x; y = pxy.y; z = pz; i = pi.i; e = pe; }
FI void set(const XYval<T> pxy, const T pz, const T pi, const T pj, const T pe) { x = pxy.x; y = pxy.y; z = pz; i = pi.i; j = pj.j; e = pe; }
FI void set(const XYval<T> pxy, const T pz, const T pi, const T pj, const T pk, const T pe) { x = pxy.x; y = pxy.y; z = pz; i = pi.i; j = pj.j; k = pk.k; e = pe; }
FI void set(const XYval<T> pxy, const T pz, const T pi, const T pj, const T pk, const T pe) { x = pxy.x; y = pxy.y; z = pz; i = pi.i; j = pj.j; ; k = pk.k; e = pe; }
FI void set(const XYval<T> pxy, const T pi, const T pj, const T pk, const XYval<T> pze) { x = pxy.x; y = pxy.y; z = pze.z; i = pi.i; j = pj.j; k = pk.k; e = pze.e; }
FI void set(const XYZval<T> pxyz, const T pe) { x = pxyz.x; y = pxyz.y; z = pxyz.z; i = pxyz.i; j = pxyz.j; k = pxyz.k; e = pe; }
FI XYZEval<T> copy() const { XYZval<T> o = *this; return o; }
Expand Down Expand Up @@ -495,8 +495,8 @@ struct XYZEval {
FI XYZEval<T> operator/ (const int &v) { XYZEval<T> ls = *this; ls.x /= v; ls.y /= v; ls.z /= v; ls.e /= v; ls.i /= v; ls.j /= v; ls.k /= v; return ls; }
FI XYZEval<T> operator>>(const int &v) const { XYZEval<T> ls = *this; _RS(ls.x); _RS(ls.y); _RS(ls.z); _RS(ls.i); _RS(ls.j); _RS(ls.k); _RS(ls.e); return ls; }
FI XYZEval<T> operator>>(const int &v) { XYZEval<T> ls = *this; _RS(ls.x); _RS(ls.y); _RS(ls.z); _RS(ls.i); _RS(ls.j); _RS(ls.k); _RS(ls.e); return ls; }
FI XYZEval<T> operator<<(const int &v) const { XYZEval<T> ls = *this; _LS(ls.x); _LS(ls.y); _LS(ls.z); _RS(ls.i); _LS(ls.j); _LS(ls.k); _LS(ls.e); return ls; }
FI XYZEval<T> operator<<(const int &v) { XYZEval<T> ls = *this; _LS(ls.x); _LS(ls.y); _LS(ls.z); _RS(ls.i); _LS(ls.j); _LS(ls.k); _LS(ls.e); return ls; }
FI XYZEval<T> operator<<(const int &v) const { XYZEval<T> ls = *this; _LS(ls.x); _LS(ls.y); _LS(ls.z); _LS(ls.i); _LS(ls.j); _LS(ls.k); _LS(ls.e); return ls; }
FI XYZEval<T> operator<<(const int &v) { XYZEval<T> ls = *this; _LS(ls.x); _LS(ls.y); _LS(ls.z); _LS(ls.i); _LS(ls.j); _LS(ls.k); _LS(ls.e); return ls; }
FI XYZEval<T>& operator+=(const XYval<T> &rs) { x += rs.x; y += rs.y; return *this; }
FI XYZEval<T>& operator-=(const XYval<T> &rs) { x -= rs.x; y -= rs.y; return *this; }
FI XYZEval<T>& operator*=(const XYval<T> &rs) { x *= rs.x; y *= rs.y; return *this; }
Expand Down Expand Up @@ -591,7 +591,7 @@ struct XYZval {
FI XYZval<T> operator* (const XYZEval<T> &rs) { XYZval<T> ls = *this; ls.x *= rs.x; ls.y *= rs.y; ls.z *= rs.z; ls.i *= rs.i; ls.j *= rs.j; return ls; }
FI XYZval<T> operator/ (const XYZEval<T> &rs) const { XYZval<T> ls = *this; ls.x /= rs.x; ls.y /= rs.y; ls.z /= rs.z; ls.i /= rs.i; ls.j /= rs.j; return ls; }
FI XYZval<T> operator/ (const XYZEval<T> &rs) { XYZval<T> ls = *this; ls.x /= rs.x; ls.y /= rs.y; ls.z /= rs.z; ls.i /= rs.i; ls.j /= rs.j; return ls; }
FI XYZval<T> operator* (const float &v) const { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; ls.x *= v; ls.j *= v; return ls; } //TODO: Test if ls.z = v or ls.z = z is correct
FI XYZval<T> operator* (const float &v) const { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; ls.i *= v; ls.j *= v; return ls; } //TODO: Test if ls.z = v or ls.z = z is correct
FI XYZval<T> operator* (const float &v) { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; ls.i *= v; ls.j *= v; return ls; }
FI XYZval<T> operator* (const int &v) const { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; ls.i *= v; ls.j *= v; return ls; }
FI XYZval<T> operator* (const int &v) { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; ls.i *= v; ls.j *= v; return ls; }
Expand Down Expand Up @@ -713,8 +713,8 @@ struct XYZEval {
FI XYZEval<T> operator/ (const int &v) { XYZEval<T> ls = *this; ls.x /= v; ls.y /= v; ls.z /= v; ls.e /= v; ls.i /= v; ls.j /= v; return ls; }
FI XYZEval<T> operator>>(const int &v) const { XYZEval<T> ls = *this; _RS(ls.x); _RS(ls.y); _RS(ls.z); _RS(ls.i); _RS(ls.j); _RS(ls.e); return ls; }
FI XYZEval<T> operator>>(const int &v) { XYZEval<T> ls = *this; _RS(ls.x); _RS(ls.y); _RS(ls.z); _RS(ls.i); _RS(ls.j); _RS(ls.e); return ls; }
FI XYZEval<T> operator<<(const int &v) const { XYZEval<T> ls = *this; _LS(ls.x); _LS(ls.y); _LS(ls.z); _RS(ls.i); _LS(ls.j); _LS(ls.e); return ls; }
FI XYZEval<T> operator<<(const int &v) { XYZEval<T> ls = *this; _LS(ls.x); _LS(ls.y); _LS(ls.z); _RS(ls.i); _LS(ls.j); _LS(ls.e); return ls; }
FI XYZEval<T> operator<<(const int &v) const { XYZEval<T> ls = *this; _LS(ls.x); _LS(ls.y); _LS(ls.z); _LS(ls.i); _LS(ls.j); _LS(ls.e); return ls; }
FI XYZEval<T> operator<<(const int &v) { XYZEval<T> ls = *this; _LS(ls.x); _LS(ls.y); _LS(ls.z); _LS(ls.i); _LS(ls.j); _LS(ls.e); return ls; }
FI XYZEval<T>& operator+=(const XYval<T> &rs) { x += rs.x; y += rs.y; return *this; }
FI XYZEval<T>& operator-=(const XYval<T> &rs) { x -= rs.x; y -= rs.y; return *this; }
FI XYZEval<T>& operator*=(const XYval<T> &rs) { x *= rs.x; y *= rs.y; return *this; }
Expand Down Expand Up @@ -806,7 +806,7 @@ struct XYZval {
FI XYZval<T> operator* (const XYZEval<T> &rs) { XYZval<T> ls = *this; ls.x *= rs.x; ls.y *= rs.y; ls.z *= rs.z; ls.i *= rs.i; return ls; }
FI XYZval<T> operator/ (const XYZEval<T> &rs) const { XYZval<T> ls = *this; ls.x /= rs.x; ls.y /= rs.y; ls.z /= rs.z; ls.i /= rs.i; return ls; }
FI XYZval<T> operator/ (const XYZEval<T> &rs) { XYZval<T> ls = *this; ls.x /= rs.x; ls.y /= rs.y; ls.z /= rs.z; ls.i /= rs.i; return ls; }
FI XYZval<T> operator* (const float &v) const { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; ls.x *= v; return ls; } //TODO: Test if ls.z = v or ls.z = z is correct
FI XYZval<T> operator* (const float &v) const { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; ls.i *= v; return ls; } //TODO: Test if ls.z = v or ls.z = z is correct
FI XYZval<T> operator* (const float &v) { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; ls.i *= v; return ls; }
FI XYZval<T> operator* (const int &v) const { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; ls.i *= v; return ls; }
FI XYZval<T> operator* (const int &v) { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; ls.i *= v; return ls; }
Expand Down Expand Up @@ -925,8 +925,8 @@ struct XYZEval {
FI XYZEval<T> operator/ (const int &v) { XYZEval<T> ls = *this; ls.x /= v; ls.y /= v; ls.z /= v; ls.e /= v; ls.i /= v; return ls; }
FI XYZEval<T> operator>>(const int &v) const { XYZEval<T> ls = *this; _RS(ls.x); _RS(ls.y); _RS(ls.z); _RS(ls.i); _RS(ls.e); return ls; }
FI XYZEval<T> operator>>(const int &v) { XYZEval<T> ls = *this; _RS(ls.x); _RS(ls.y); _RS(ls.z); _RS(ls.i); _RS(ls.e); return ls; }
FI XYZEval<T> operator<<(const int &v) const { XYZEval<T> ls = *this; _LS(ls.x); _LS(ls.y); _LS(ls.z); _RS(ls.i); _LS(ls.e); return ls; }
FI XYZEval<T> operator<<(const int &v) { XYZEval<T> ls = *this; _LS(ls.x); _LS(ls.y); _LS(ls.z); _RS(ls.i); _LS(ls.e); return ls; }
FI XYZEval<T> operator<<(const int &v) const { XYZEval<T> ls = *this; _LS(ls.x); _LS(ls.y); _LS(ls.z); _LS(ls.i); _LS(ls.e); return ls; }
FI XYZEval<T> operator<<(const int &v) { XYZEval<T> ls = *this; _LS(ls.x); _LS(ls.y); _LS(ls.z); _LS(ls.i); _LS(ls.e); return ls; }
FI XYZEval<T>& operator+=(const XYval<T> &rs) { x += rs.x; y += rs.y; return *this; }
FI XYZEval<T>& operator-=(const XYval<T> &rs) { x -= rs.x; y -= rs.y; return *this; }
FI XYZEval<T>& operator*=(const XYval<T> &rs) { x *= rs.x; y *= rs.y; return *this; }
Expand Down
5 changes: 1 addition & 4 deletions Marlin/src/gcode/config/M92.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void report_M92(const bool echo=true, const int8_t e=-1) {
PSTR(" M92 X"), LINEAR_UNIT(planner.settings.axis_steps_per_mm[X_AXIS]),
SP_Y_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[Y_AXIS]),
SP_Z_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[Z_AXIS]),
SP_I_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[I_AXIS]), // FIXME: Devision by 4.0 to work around issue that seemmingly, internally used steps_per_mm[I_AXIS] = DEFAULT_STEPS_PER_UNIT[I_AXIS]/4.0 ?
SP_I_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[I_AXIS]),
SP_J_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[J_AXIS]),
SP_K_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[K_AXIS]))
);
Expand Down Expand Up @@ -90,9 +90,6 @@ void GcodeSuite::M92() {
}
else {
planner.settings.axis_steps_per_mm[i] = parser.value_per_axis_units((AxisEnum)i);
#if LINEAR_AXES >= 4 // FIXME (DerAndere): Work around issue that actual internal steps_per_mm for the I_AXIS is only a quater of the STEPS_PER_UNIT
if (i == 3) planner.settings.axis_steps_per_mm[i] *= 4.0f;
#endif
}
}
}
Expand Down
10 changes: 8 additions & 2 deletions Marlin/src/module/motion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ void _internal_move_to_destination(const feedRate_t &fr_mm_s/*=0.0f*/
}

/**
* Plan a move to (X, Y, Z) and set the current_position
* Plan a move to (X, Y, Z, [I, [J, [K]]]) and set the current_position
*/
void do_blocking_move_to(
LIST_N(LINEAR_AXES, const float rx, const float ry, const float rz, const float ri, const float rj, const float rk),
Expand Down Expand Up @@ -552,7 +552,7 @@ void do_blocking_move_to_z(const float &rz, const feedRate_t &fr_mm_s/*=0.0*/) {
do_blocking_move_to_xy_z(current_position, rz, fr_mm_s);
}

#if LINEAR_AXES >= 4
#if LINEAR_AXES == 4
void do_blocking_move_to_i(const float &ri, const feedRate_t &fr_mm_s/*=0.0*/) {
do_blocking_move_to_xyz_i(current_position, ri, fr_mm_s);
}
Expand All @@ -562,6 +562,12 @@ void do_blocking_move_to_z(const float &rz, const feedRate_t &fr_mm_s/*=0.0*/) {
#endif

#if LINEAR_AXES >= 5
void do_blocking_move_to_i(const float &ri, const feedRate_t &fr_mm_s/*=0.0*/) {
do_blocking_move_to_xyz_i(current_position, ri, fr_mm_s);
}
void do_blocking_move_to_xyz_i(const xyze_pos_t &raw, const float &i, const feedRate_t &fr_mm_s/*=0.0f*/) {
do_blocking_move_to(raw.x, raw.y, raw.z, i, raw.j, fr_mm_s);
}
void do_blocking_move_to_j(const float &rj, const feedRate_t &fr_mm_s/*=0.0*/) {
do_blocking_move_to_xyzi_j(current_position, rj, fr_mm_s);
}
Expand Down
14 changes: 2 additions & 12 deletions Marlin/src/module/planner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3201,18 +3201,8 @@ void Planner::set_max_feedrate(const uint8_t axis, float targetValue) {
#endif
limit_and_warn(targetValue, axis, PSTR("Feedrate"), max_fr_edit_scaled);
#endif
#if LINEAR_AXES >= 4
// FIXME (DerAndere):!!! Work-around for issue with internal feedrate for I_AXIS

if (axis == 3) {
settings.max_feedrate_mm_s[axis] = targetValue * 4.0;
}
else {
settings.max_feedrate_mm_s[axis] = targetValue;
}
#else
settings.max_feedrate_mm_s[axis] = targetValue;
#endif

settings.max_feedrate_mm_s[axis] = targetValue;
}

void Planner::set_max_jerk(const AxisEnum axis, float targetValue) {
Expand Down
2 changes: 0 additions & 2 deletions Marlin/src/module/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2493,9 +2493,7 @@ void MarlinSettings::postprocess() {
void MarlinSettings::reset() {
LOOP_NUM_AXIS_N(i) {
planner.settings.max_acceleration_mm_per_s2[i] = pgm_read_dword(&_DMA[ALIM(i, _DMA)]);
// FIXME (DerAndere):!!! Work around issue where actual internally-used steps_per_mm for I_AXIS are only 1/4 of STEPS_PER_UNIT
planner.settings.axis_steps_per_mm[i] = pgm_read_float(&_DASU[ALIM(i, _DASU)]);
if (LINEAR_AXES >= 4 && i == 3) planner.settings.axis_steps_per_mm[i] *= 4.0f;
planner.settings.max_feedrate_mm_s[i] = pgm_read_float(&_DMF[ALIM(i, _DMF)]);
}

Expand Down
Loading

0 comments on commit cbc9394

Please sign in to comment.