🏗️ More 9-axis updates

This commit is contained in:
Scott Lahteine 2022-04-03 20:34:48 -05:00
parent 1fdad42c5f
commit f5daefb09d
8 changed files with 47 additions and 7 deletions

View file

@ -2865,6 +2865,7 @@
#define U_RSENSE 0.11 #define U_RSENSE 0.11
#define U_CHAIN_POS -1 #define U_CHAIN_POS -1
//#define U_INTERPOLATE true //#define U_INTERPOLATE true
//#define U_HOLD_MULTIPLIER 0.5
#endif #endif
#if AXIS_IS_TMC(V) #if AXIS_IS_TMC(V)
@ -2874,6 +2875,7 @@
#define V_RSENSE 0.11 #define V_RSENSE 0.11
#define V_CHAIN_POS -1 #define V_CHAIN_POS -1
//#define V_INTERPOLATE true //#define V_INTERPOLATE true
//#define V_HOLD_MULTIPLIER 0.5
#endif #endif
#if AXIS_IS_TMC(W) #if AXIS_IS_TMC(W)
@ -2883,6 +2885,7 @@
#define W_RSENSE 0.11 #define W_RSENSE 0.11
#define W_CHAIN_POS -1 #define W_CHAIN_POS -1
//#define W_INTERPOLATE true //#define W_INTERPOLATE true
//#define W_HOLD_MULTIPLIER 0.5
#endif #endif
#if AXIS_IS_TMC(E0) #if AXIS_IS_TMC(E0)

View file

@ -66,7 +66,7 @@ void GcodeSuite::M425() {
LOOP_NUM_AXES(a) { LOOP_NUM_AXES(a) {
if (axis_can_calibrate(a) && parser.seen(AXIS_CHAR(a))) { if (axis_can_calibrate(a) && parser.seen(AXIS_CHAR(a))) {
planner.synchronize(); planner.synchronize();
backlash.set_distance_mm(AxisEnum(a), parser.has_value() ? parser.value_axis_units(AxisEnum(a)) : backlash.get_measurement(AxisEnum(a))); backlash.set_distance_mm((AxisEnum)a, parser.has_value() ? parser.value_axis_units((AxisEnum)a) : backlash.get_measurement((AxisEnum)a));
noArgs = false; noArgs = false;
} }
} }

View file

@ -144,7 +144,7 @@ void GcodeSuite::M201_report(const bool forReplay/*=true*/) {
SP_K_STR, K_AXIS_UNIT(planner.settings.max_acceleration_mm_per_s2[K_AXIS]), SP_K_STR, K_AXIS_UNIT(planner.settings.max_acceleration_mm_per_s2[K_AXIS]),
SP_U_STR, U_AXIS_UNIT(planner.settings.max_acceleration_mm_per_s2[U_AXIS]), SP_U_STR, U_AXIS_UNIT(planner.settings.max_acceleration_mm_per_s2[U_AXIS]),
SP_V_STR, V_AXIS_UNIT(planner.settings.max_acceleration_mm_per_s2[V_AXIS]), SP_V_STR, V_AXIS_UNIT(planner.settings.max_acceleration_mm_per_s2[V_AXIS]),
SP_W_STR, W_AXIS_UNIT(planner.settings.max_acceleration_mm_per_s2[W_AXIS]), SP_W_STR, W_AXIS_UNIT(planner.settings.max_acceleration_mm_per_s2[W_AXIS])
) )
#if HAS_EXTRUDERS && DISABLED(DISTINCT_E_FACTORS) #if HAS_EXTRUDERS && DISABLED(DISTINCT_E_FACTORS)
, SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_acceleration_mm_per_s2[E_AXIS]) , SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_acceleration_mm_per_s2[E_AXIS])

View file

@ -92,7 +92,7 @@ void do_enable(const stepper_flags_t to_enable) {
if ((also_enabled &= ~(shall_enable | was_enabled))) { if ((also_enabled &= ~(shall_enable | was_enabled))) {
SERIAL_CHAR('('); SERIAL_CHAR('(');
LOOP_NUM_AXES(a) if (TEST(also_enabled, a)) SERIAL_CHAR(axis_codes[a], ' '); LOOP_NUM_AXES(a) if (TEST(also_enabled, a)) SERIAL_CHAR(AXIS_CHAR(a), ' ');
#if HAS_EXTRUDERS #if HAS_EXTRUDERS
#define _EN_ALSO(N) if (TEST(also_enabled, INDEX_OF_AXIS(E_AXIS, N))) SERIAL_CHAR('E', '0' + N, ' '); #define _EN_ALSO(N) if (TEST(also_enabled, INDEX_OF_AXIS(E_AXIS, N))) SERIAL_CHAR('E', '0' + N, ' ');
REPEAT(EXTRUDERS, _EN_ALSO) REPEAT(EXTRUDERS, _EN_ALSO)

View file

@ -285,6 +285,25 @@ void GcodeSuite::M906() {
break; break;
#endif #endif
#if AXIS_IS_L64XX(I)
case I_AXIS: L6470_SET_KVAL_HOLD(I); break;
#endif
#if AXIS_IS_L64XX(J)
case J_AXIS: L6470_SET_KVAL_HOLD(J); break;
#endif
#if AXIS_IS_L64XX(K)
case K_AXIS: L6470_SET_KVAL_HOLD(K); break;
#endif
#if AXIS_IS_L64XX(U)
case U_AXIS: L6470_SET_KVAL_HOLD(U); break;
#endif
#if AXIS_IS_L64XX(V)
case V_AXIS: L6470_SET_KVAL_HOLD(V); break;
#endif
#if AXIS_IS_L64XX(W)
case W_AXIS: L6470_SET_KVAL_HOLD(W); break;
#endif
#if AXIS_IS_L64XX(E0) || AXIS_IS_L64XX(E1) || AXIS_IS_L64XX(E2) || AXIS_IS_L64XX(E3) || AXIS_IS_L64XX(E4) || AXIS_IS_L64XX(E5) || AXIS_IS_L64XX(E6) || AXIS_IS_L64XX(E7) #if AXIS_IS_L64XX(E0) || AXIS_IS_L64XX(E1) || AXIS_IS_L64XX(E2) || AXIS_IS_L64XX(E3) || AXIS_IS_L64XX(E4) || AXIS_IS_L64XX(E5) || AXIS_IS_L64XX(E6) || AXIS_IS_L64XX(E7)
case E_AXIS: { case E_AXIS: {
const int8_t eindex = get_target_e_stepper_from_command(-2); const int8_t eindex = get_target_e_stepper_from_command(-2);
@ -346,6 +365,24 @@ void GcodeSuite::M906() {
#if AXIS_IS_L64XX(Z4) #if AXIS_IS_L64XX(Z4)
L64XX_REPORT_CURRENT(Z4); L64XX_REPORT_CURRENT(Z4);
#endif #endif
#if AXIS_IS_L64XX(I)
L64XX_REPORT_CURRENT(I);
#endif
#if AXIS_IS_L64XX(J)
L64XX_REPORT_CURRENT(J);
#endif
#if AXIS_IS_L64XX(K)
L64XX_REPORT_CURRENT(K);
#endif
#if AXIS_IS_L64XX(U)
L64XX_REPORT_CURRENT(U);
#endif
#if AXIS_IS_L64XX(V)
L64XX_REPORT_CURRENT(V);
#endif
#if AXIS_IS_L64XX(W)
L64XX_REPORT_CURRENT(W);
#endif
#if AXIS_IS_L64XX(E0) #if AXIS_IS_L64XX(E0)
L64XX_REPORT_CURRENT(E0); L64XX_REPORT_CURRENT(E0);
#endif #endif

View file

@ -34,7 +34,7 @@
#include "../../core/debug_out.h" #include "../../core/debug_out.h"
#endif #endif
void report_all_axis_pos(const xyze_pos_t &pos, const uint8_t n=XYZE, const uint8_t precision=3) { void report_all_axis_pos(const xyze_pos_t &pos, const uint8_t n=LOGICAL_AXES, const uint8_t precision=3) {
char str[12]; char str[12];
LOOP_L_N(a, n) { LOOP_L_N(a, n) {
SERIAL_CHAR(' ', axis_codes[a], ':'); SERIAL_CHAR(' ', axis_codes[a], ':');

View file

@ -415,8 +415,8 @@ uint8_t L64XX_Marlin::get_user_input(uint8_t &driver_count, L64XX_axis_t axis_in
LOOP_LOGICAL_AXES(i) if (uint16_t _displacement = parser.intval(axis_codes[i])) { LOOP_LOGICAL_AXES(i) if (uint16_t _displacement = parser.intval(axis_codes[i])) {
found_displacement = true; found_displacement = true;
displacement = _displacement; displacement = _displacement;
uint8_t axis_offset = parser.byteval('J'); const uint8_t axis_offset = parser.byteval('J');
axis_mon[0][0] = axis_codes[i]; // Axis first character, one of XYZE axis_mon[0][0] = axis_codes[i]; // Axis first character, one of XYZ...E
const bool single_or_e = axis_offset >= 2 || axis_mon[0][0] == 'E', const bool single_or_e = axis_offset >= 2 || axis_mon[0][0] == 'E',
one_or_more = !single_or_e && axis_offset == 0; one_or_more = !single_or_e && axis_offset == 0;
uint8_t driver_count_local = 0; // Can't use "driver_count" directly as a subscript because it's passed by reference uint8_t driver_count_local = 0; // Can't use "driver_count" directly as a subscript because it's passed by reference

View file

@ -36,7 +36,7 @@
#define HAS_L64XX_EXTRUDER (AXIS_IS_L64XX(E0) || AXIS_IS_L64XX(E1) || AXIS_IS_L64XX(E2) || AXIS_IS_L64XX(E3) || AXIS_IS_L64XX(E4) || AXIS_IS_L64XX(E5) || AXIS_IS_L64XX(E6) || AXIS_IS_L64XX(E7)) #define HAS_L64XX_EXTRUDER (AXIS_IS_L64XX(E0) || AXIS_IS_L64XX(E1) || AXIS_IS_L64XX(E2) || AXIS_IS_L64XX(E3) || AXIS_IS_L64XX(E4) || AXIS_IS_L64XX(E5) || AXIS_IS_L64XX(E6) || AXIS_IS_L64XX(E7))
#define _EN_ITEM(N) , E##N #define _EN_ITEM(N) , E##N
enum L64XX_axis_t : uint8_t { NUM_AXIS_LIST(X, Y, Z, I, J, K), X2, Y2, Z2, Z3, Z4 REPEAT(E_STEPPERS, _EN_ITEM), MAX_L64XX }; enum L64XX_axis_t : uint8_t { NUM_AXIS_LIST(X, Y, Z, I, J, K, U, V, W), X2, Y2, Z2, Z3, Z4 REPEAT(E_STEPPERS, _EN_ITEM), MAX_L64XX };
#undef _EN_ITEM #undef _EN_ITEM
class L64XX_Marlin : public L64XXHelper { class L64XX_Marlin : public L64XXHelper {