mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-12-29 02:40:41 -07:00
🧑💻 Old macros cleanup
This commit is contained in:
parent
579545177d
commit
ba8b685ede
8 changed files with 9 additions and 15 deletions
|
|
@ -25,12 +25,6 @@
|
|||
#define __has_include(...) 1
|
||||
#endif
|
||||
|
||||
#define ABCE 4
|
||||
#define XYZE 4
|
||||
#define ABC 3
|
||||
#define XYZ 3
|
||||
#define XY 2
|
||||
|
||||
#define _AXIS(A) (A##_AXIS)
|
||||
|
||||
#define _FORCE_INLINE_ __attribute__((__always_inline__)) __inline__
|
||||
|
|
|
|||
|
|
@ -541,7 +541,7 @@ struct XYval {
|
|||
#endif
|
||||
#if HAS_Y_AXIS
|
||||
FI void set(const T px, const T py) { x = px; y = py; }
|
||||
FI void set(const T (&arr)[XY]) { x = arr[0]; y = arr[1]; }
|
||||
FI void set(const T (&arr)[2]) { x = arr[0]; y = arr[1]; }
|
||||
#endif
|
||||
#if NUM_AXES > XY
|
||||
FI void set(const T (&arr)[NUM_AXES]) { x = arr[0]; y = arr[1]; }
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#include "../gcode.h"
|
||||
#include "../../module/stepper.h"
|
||||
|
||||
#if NUM_AXES == XYZ && EXTRUDERS >= 1
|
||||
#if NUM_AXES == 3 && EXTRUDERS >= 1
|
||||
#define HAS_M350_B_PARAM 1 // "5th axis" (after E0) for an original XYZEB setup.
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
}
|
||||
SERIAL_EOL();
|
||||
}
|
||||
inline void report_linear_axis_pos(const xyze_pos_t &pos) { report_all_axis_pos(pos, XYZ); }
|
||||
inline void report_linear_axis_pos(const xyze_pos_t &pos) { report_all_axis_pos(pos, 3); }
|
||||
|
||||
void report_linear_axis_pos(const xyz_pos_t &pos, const uint8_t precision=3) {
|
||||
LOOP_NUM_AXES(a) SERIAL_ECHO(FPSTR(pgm_read_ptr(&SP_AXIS_LBL[a])), p_float_t(pos[a], precision));
|
||||
|
|
|
|||
|
|
@ -600,7 +600,7 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
|
|||
|
||||
#if ENABLED(NOZZLE_PARK_FEATURE)
|
||||
constexpr float npp[] = NOZZLE_PARK_POINT;
|
||||
static_assert(COUNT(npp) == _MIN(NUM_AXES, XYZ), "NOZZLE_PARK_POINT requires coordinates for enabled axes, but only up to X,Y,Z.");
|
||||
static_assert(COUNT(npp) == _MIN(NUM_AXES, 3), "NOZZLE_PARK_POINT requires coordinates for enabled axes, but only up to X,Y,Z.");
|
||||
constexpr xyz_pos_t npp_xyz = NOZZLE_PARK_POINT;
|
||||
static_assert(WITHIN(npp_xyz.x, X_MIN_POS, X_MAX_POS), "NOZZLE_PARK_POINT.X is out of bounds (X_MIN_POS, X_MAX_POS).");
|
||||
static_assert(TERN1(HAS_Y_AXIS, WITHIN(npp_xyz.y, Y_MIN_POS, Y_MAX_POS)), "NOZZLE_PARK_POINT.Y is out of bounds (Y_MIN_POS, Y_MAX_POS).");
|
||||
|
|
@ -1122,7 +1122,7 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i
|
|||
#error "Leveling in Marlin requires three or more axes, with Z as the vertical axis."
|
||||
#elif ENABLED(CNC_WORKSPACE_PLANES) && !HAS_Z_AXIS
|
||||
#error "CNC_WORKSPACE_PLANES currently requires a Z axis"
|
||||
#elif ENABLED(DIRECT_STEPPING) && NUM_AXES > XYZ
|
||||
#elif ENABLED(DIRECT_STEPPING) && NUM_AXES > 3
|
||||
#error "DIRECT_STEPPING does not currently support more than 3 axes (i.e., XYZ)."
|
||||
#elif ENABLED(FOAMCUTTER_XYUV) && !(HAS_I_AXIS && HAS_J_AXIS)
|
||||
#error "FOAMCUTTER_XYUV requires I and J steppers to be enabled."
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ float delta_radius,
|
|||
delta_diagonal_rod,
|
||||
segments_per_second;
|
||||
abc_float_t delta_tower_angle_trim;
|
||||
xy_float_t delta_tower[ABC];
|
||||
xy_float_t delta_tower[3];
|
||||
abc_float_t delta_diagonal_rod_2_tower;
|
||||
float delta_clip_start_height = Z_MAX_POS;
|
||||
abc_float_t delta_diagonal_rod_trim;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ extern float delta_radius,
|
|||
delta_diagonal_rod,
|
||||
segments_per_second;
|
||||
extern abc_float_t delta_tower_angle_trim;
|
||||
extern xy_float_t delta_tower[ABC];
|
||||
extern xy_float_t delta_tower[3];
|
||||
extern abc_float_t delta_diagonal_rod_2_tower;
|
||||
extern float delta_clip_start_height;
|
||||
extern abc_float_t delta_diagonal_rod_trim;
|
||||
|
|
|
|||
|
|
@ -120,12 +120,12 @@ xyze_pos_t destination; // {0}
|
|||
#if HAS_HOTEND_OFFSET
|
||||
xyz_pos_t hotend_offset[HOTENDS]; // Initialized by settings.load
|
||||
void reset_hotend_offsets() {
|
||||
constexpr float tmp[XYZ][HOTENDS] = { HOTEND_OFFSET_X, HOTEND_OFFSET_Y, HOTEND_OFFSET_Z };
|
||||
constexpr float tmp[3][HOTENDS] = { HOTEND_OFFSET_X, HOTEND_OFFSET_Y, HOTEND_OFFSET_Z };
|
||||
static_assert(
|
||||
!tmp[X_AXIS][0] && !tmp[Y_AXIS][0] && !tmp[Z_AXIS][0],
|
||||
"Offsets for the first hotend must be 0.0."
|
||||
);
|
||||
// Transpose from [XYZ][HOTENDS] to [HOTENDS][XYZ]
|
||||
// Transpose from [3][HOTENDS] to [HOTENDS][3]
|
||||
HOTEND_LOOP() LOOP_ABC(a) hotend_offset[e][a] = tmp[a][e];
|
||||
TERN_(DUAL_X_CARRIAGE, hotend_offset[1].x = _MAX(X2_HOME_POS, X2_MAX_POS));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue