mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-02-24 18:07:31 +00:00
🧑💻 Axis relative flags type
This commit is contained in:
parent
573bc7344b
commit
1234e6af52
3 changed files with 9 additions and 15 deletions
|
@ -113,7 +113,7 @@ typedef struct {
|
||||||
millis_t print_job_elapsed;
|
millis_t print_job_elapsed;
|
||||||
|
|
||||||
// Relative axis modes
|
// Relative axis modes
|
||||||
uint8_t axis_relative;
|
relative_t axis_relative;
|
||||||
|
|
||||||
// Misc. Marlin flags
|
// Misc. Marlin flags
|
||||||
struct {
|
struct {
|
||||||
|
|
|
@ -80,19 +80,7 @@ millis_t GcodeSuite::previous_move_ms = 0,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Relative motion mode for each logical axis
|
// Relative motion mode for each logical axis
|
||||||
static constexpr xyze_bool_t ar_init = AXIS_RELATIVE_MODES;
|
relative_t GcodeSuite::axis_relative; // Init in constructor
|
||||||
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)
|
|
||||||
);
|
|
||||||
|
|
||||||
#if EITHER(HAS_AUTO_REPORTING, HOST_KEEPALIVE_FEATURE)
|
#if EITHER(HAS_AUTO_REPORTING, HOST_KEEPALIVE_FEATURE)
|
||||||
bool GcodeSuite::autoreport_paused; // = false
|
bool GcodeSuite::autoreport_paused; // = false
|
||||||
|
|
|
@ -345,14 +345,20 @@ enum AxisRelative : uint8_t {
|
||||||
#if HAS_EXTRUDERS
|
#if HAS_EXTRUDERS
|
||||||
, E_MODE_ABS, E_MODE_REL
|
, E_MODE_ABS, E_MODE_REL
|
||||||
#endif
|
#endif
|
||||||
|
, NUM_REL_MODES
|
||||||
};
|
};
|
||||||
|
typedef bits_t(NUM_REL_MODES) relative_t;
|
||||||
|
|
||||||
extern const char G28_STR[];
|
extern const char G28_STR[];
|
||||||
|
|
||||||
class GcodeSuite {
|
class GcodeSuite {
|
||||||
public:
|
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) {
|
static bool axis_is_relative(const AxisEnum a) {
|
||||||
#if HAS_EXTRUDERS
|
#if HAS_EXTRUDERS
|
||||||
|
|
Loading…
Reference in a new issue