🧑💻 Axis relative flags type
This commit is contained in:
parent
573bc7344b
commit
1234e6af52
|
@ -113,7 +113,7 @@ typedef struct {
|
|||
millis_t print_job_elapsed;
|
||||
|
||||
// Relative axis modes
|
||||
uint8_t axis_relative;
|
||||
relative_t axis_relative;
|
||||
|
||||
// Misc. Marlin flags
|
||||
struct {
|
||||
|
|
|
@ -80,19 +80,7 @@ millis_t GcodeSuite::previous_move_ms = 0,
|
|||
#endif
|
||||
|
||||
// Relative motion mode for each logical axis
|
||||
static constexpr xyze_bool_t ar_init = AXIS_RELATIVE_MODES;
|
||||
axis_bits_t GcodeSuite::axis_relative = 0 LOGICAL_AXIS_GANG(
|
||||
| (ar_init.e << REL_E),
|
||||
| (ar_init.x << REL_X),
|
||||
| (ar_init.y << REL_Y),
|
||||
| (ar_init.z << REL_Z),
|
||||
| (ar_init.i << REL_I),
|
||||
| (ar_init.j << REL_J),
|
||||
| (ar_init.k << REL_K),
|
||||
| (ar_init.u << REL_U),
|
||||
| (ar_init.v << REL_V),
|
||||
| (ar_init.w << REL_W)
|
||||
);
|
||||
relative_t GcodeSuite::axis_relative; // Init in constructor
|
||||
|
||||
#if EITHER(HAS_AUTO_REPORTING, HOST_KEEPALIVE_FEATURE)
|
||||
bool GcodeSuite::autoreport_paused; // = false
|
||||
|
|
|
@ -345,14 +345,20 @@ enum AxisRelative : uint8_t {
|
|||
#if HAS_EXTRUDERS
|
||||
, E_MODE_ABS, E_MODE_REL
|
||||
#endif
|
||||
, NUM_REL_MODES
|
||||
};
|
||||
typedef bits_t(NUM_REL_MODES) relative_t;
|
||||
|
||||
extern const char G28_STR[];
|
||||
|
||||
class GcodeSuite {
|
||||
public:
|
||||
|
||||
static axis_bits_t axis_relative;
|
||||
static relative_t axis_relative;
|
||||
|
||||
GcodeSuite() { // Relative motion mode for each logical axis
|
||||
axis_relative = AxisBits(AXIS_RELATIVE_MODES).bits;
|
||||
}
|
||||
|
||||
static bool axis_is_relative(const AxisEnum a) {
|
||||
#if HAS_EXTRUDERS
|
||||
|
|
Loading…
Reference in a new issue