Make dual_x_carriage_mode an enumeration
This commit is contained in:
parent
d6c36f5bb9
commit
2495ab7af2
|
@ -313,7 +313,7 @@
|
|||
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
|
||||
|
||||
// This is the default power-up mode which can be later using M605.
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
|
||||
|
||||
// Default settings in "Auto-park Mode"
|
||||
#define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
|
||||
|
|
|
@ -1303,11 +1303,7 @@ bool get_target_extruder_from_command(int code) {
|
|||
|
||||
#if ENABLED(DUAL_X_CARRIAGE)
|
||||
|
||||
#define DXC_FULL_CONTROL_MODE 0
|
||||
#define DXC_AUTO_PARK_MODE 1
|
||||
#define DXC_DUPLICATION_MODE 2
|
||||
|
||||
static int dual_x_carriage_mode = DEFAULT_DUAL_X_CARRIAGE_MODE;
|
||||
static DualXMode dual_x_carriage_mode = DEFAULT_DUAL_X_CARRIAGE_MODE;
|
||||
|
||||
static float x_home_pos(int extruder) {
|
||||
if (extruder == 0)
|
||||
|
@ -6950,7 +6946,7 @@ inline void gcode_M503() {
|
|||
*/
|
||||
inline void gcode_M605() {
|
||||
stepper.synchronize();
|
||||
if (code_seen('S')) dual_x_carriage_mode = code_value_byte();
|
||||
if (code_seen('S')) dual_x_carriage_mode = (DualXMode)code_value_byte();
|
||||
switch (dual_x_carriage_mode) {
|
||||
case DXC_DUPLICATION_MODE:
|
||||
if (code_seen('X')) duplicate_extruder_x_offset = max(code_value_axis_units(X_AXIS), X2_MIN_POS - x_home_pos(0));
|
||||
|
|
|
@ -194,4 +194,12 @@ enum LCDViewAction {
|
|||
LCDVIEW_CALL_NO_REDRAW
|
||||
};
|
||||
|
||||
#if ENABLED(DUAL_X_CARRIAGE)
|
||||
enum DualXMode {
|
||||
DXC_FULL_CONTROL_MODE,
|
||||
DXC_AUTO_PARK_MODE,
|
||||
DXC_DUPLICATION_MODE
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif // __ENUM_H__
|
||||
|
|
|
@ -313,7 +313,7 @@
|
|||
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
|
||||
|
||||
// This is the default power-up mode which can be later using M605.
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
|
||||
|
||||
// Default settings in "Auto-park Mode"
|
||||
#define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
|
||||
|
|
|
@ -313,7 +313,7 @@
|
|||
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
|
||||
|
||||
// This is the default power-up mode which can be later using M605.
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
|
||||
|
||||
// Default settings in "Auto-park Mode"
|
||||
#define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
|
||||
|
|
|
@ -313,7 +313,7 @@
|
|||
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
|
||||
|
||||
// This is the default power-up mode which can be later using M605.
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
|
||||
|
||||
// Default settings in "Auto-park Mode"
|
||||
#define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
|
||||
|
|
|
@ -313,7 +313,7 @@
|
|||
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
|
||||
|
||||
// This is the default power-up mode which can be later using M605.
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
|
||||
|
||||
// Default settings in "Auto-park Mode"
|
||||
#define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
|
||||
|
|
|
@ -319,7 +319,7 @@
|
|||
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
|
||||
|
||||
// This is the default power-up mode which can be later using M605.
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
|
||||
|
||||
// Default settings in "Auto-park Mode"
|
||||
#define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
|
||||
|
|
|
@ -313,7 +313,7 @@
|
|||
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
|
||||
|
||||
// This is the default power-up mode which can be later using M605.
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
|
||||
|
||||
// Default settings in "Auto-park Mode"
|
||||
#define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
|
||||
|
|
|
@ -313,7 +313,7 @@
|
|||
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
|
||||
|
||||
// This is the default power-up mode which can be later using M605.
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
|
||||
|
||||
// Default settings in "Auto-park Mode"
|
||||
#define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
|
||||
|
|
|
@ -313,7 +313,7 @@
|
|||
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
|
||||
|
||||
// This is the default power-up mode which can be later using M605.
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
|
||||
|
||||
// Default settings in "Auto-park Mode"
|
||||
#define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
|
||||
|
|
|
@ -321,7 +321,7 @@
|
|||
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
|
||||
|
||||
// This is the default power-up mode which can be later using M605.
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
|
||||
|
||||
// Default settings in "Auto-park Mode"
|
||||
#define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
|
||||
|
|
|
@ -313,7 +313,7 @@
|
|||
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
|
||||
|
||||
// This is the default power-up mode which can be later using M605.
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
|
||||
|
||||
// Default settings in "Auto-park Mode"
|
||||
#define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
|
||||
|
|
|
@ -313,7 +313,7 @@
|
|||
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
|
||||
|
||||
// This is the default power-up mode which can be later using M605.
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
|
||||
|
||||
// Default settings in "Auto-park Mode"
|
||||
#define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
|
||||
|
|
|
@ -313,7 +313,7 @@
|
|||
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
|
||||
|
||||
// This is the default power-up mode which can be later using M605.
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
|
||||
|
||||
// Default settings in "Auto-park Mode"
|
||||
#define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
|
||||
|
|
|
@ -313,7 +313,7 @@
|
|||
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
|
||||
|
||||
// This is the default power-up mode which can be later using M605.
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
|
||||
|
||||
// Default settings in "Auto-park Mode"
|
||||
#define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
|
||||
|
|
|
@ -318,7 +318,7 @@
|
|||
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
|
||||
|
||||
// This is the default power-up mode which can be later using M605.
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
|
||||
|
||||
// Default settings in "Auto-park Mode"
|
||||
#define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
|
||||
|
|
|
@ -313,7 +313,7 @@
|
|||
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
|
||||
|
||||
// This is the default power-up mode which can be later using M605.
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
|
||||
|
||||
// Default settings in "Auto-park Mode"
|
||||
#define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
|
||||
|
|
|
@ -313,7 +313,7 @@
|
|||
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
|
||||
|
||||
// This is the default power-up mode which can be later using M605.
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
|
||||
|
||||
// Default settings in "Auto-park Mode"
|
||||
#define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
|
||||
|
|
|
@ -313,7 +313,7 @@
|
|||
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
|
||||
|
||||
// This is the default power-up mode which can be later using M605.
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
|
||||
|
||||
// Default settings in "Auto-park Mode"
|
||||
#define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
|
||||
|
|
Loading…
Reference in a new issue