Skip to content

Commit

Permalink
Add mk3 compatibility to G90 command
Browse files Browse the repository at this point in the history
  • Loading branch information
bkerler authored and danopernis committed Apr 29, 2024
1 parent 30b9630 commit f691187
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/Marlin/Marlin/src/gcode/gcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,15 @@ class GcodeSuite {
return TEST(axis_relative, a);
}
static inline void set_relative_mode(const bool rel) {
axis_relative = rel ? _BV(REL_X) | _BV(REL_Y) | _BV(REL_Z) | _BV(REL_E) : 0;
#if ENABLED(GCODE_COMPATIBILITY_MK3)
if (compatibility_mode == CompatibilityMode::MK3) {
axis_relative = rel ? _BV(REL_X) | _BV(REL_Y) | _BV(REL_Z) : 0;
} else {
axis_relative = rel ? _BV(REL_X) | _BV(REL_Y) | _BV(REL_Z) | _BV(REL_E) : 0;
}
#else
axis_relative = rel ? _BV(REL_X) | _BV(REL_Y) | _BV(REL_Z) | _BV(REL_E) : 0;
#endif
}
static inline void set_e_relative() {
CBI(axis_relative, E_MODE_ABS);
Expand Down

0 comments on commit f691187

Please sign in to comment.