|
@ -119,19 +119,37 @@ static void lcd_factory_settings() { |
|
|
|
|
|
|
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if ENABLED(DUAL_X_CARRIAGE) |
|
|
#if HAS_HOTEND_OFFSET |
|
|
|
|
|
|
|
|
#include "../../module/motion.h" |
|
|
#include "../../module/motion.h" |
|
|
#include "../../gcode/queue.h" |
|
|
#include "../../gcode/queue.h" |
|
|
|
|
|
|
|
|
void _recalc_IDEX_settings() { |
|
|
void _recalc_offsets() { |
|
|
if (active_extruder) { // For the 2nd extruder re-home so the next tool-change gets the new offsets.
|
|
|
if (active_extruder && all_axes_known()) { // For the 2nd extruder re-home so the next tool-change gets the new offsets.
|
|
|
enqueue_and_echo_commands_P(PSTR("G28")); // In future, we can babystep the 2nd extruder (if active), making homing unnecessary.
|
|
|
enqueue_and_echo_commands_P(PSTR("G28")); // In future, we can babystep the 2nd extruder (if active), making homing unnecessary.
|
|
|
active_extruder = 0; |
|
|
active_extruder = 0; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void menu_IDEX() { |
|
|
void menu_tool_offsets() { |
|
|
|
|
|
START_MENU(); |
|
|
|
|
|
MENU_BACK(MSG_MAIN); |
|
|
|
|
|
#if ENABLED(DUAL_X_CARRIAGE) |
|
|
|
|
|
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float52, MSG_X_OFFSET, &hotend_offset[X_AXIS][1], MIN(X2_HOME_POS, X2_MAX_POS) - 25.0, MAX(X2_HOME_POS, X2_MAX_POS) + 25.0, _recalc_offsets); |
|
|
|
|
|
#else |
|
|
|
|
|
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float52, MSG_X_OFFSET, &hotend_offset[X_AXIS][1], -10.0, 10.0, _recalc_offsets); |
|
|
|
|
|
#endif |
|
|
|
|
|
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float52, MSG_Y_OFFSET, &hotend_offset[Y_AXIS][1], -10.0, 10.0, _recalc_offsets); |
|
|
|
|
|
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float52, MSG_Z_OFFSET, &hotend_offset[Z_AXIS][1], Z_PROBE_LOW_POINT, 10.0, _recalc_offsets); |
|
|
|
|
|
#if ENABLED(EEPROM_SETTINGS) |
|
|
|
|
|
MENU_ITEM(function, MSG_STORE_EEPROM, lcd_store_settings); |
|
|
|
|
|
#endif |
|
|
|
|
|
END_MENU(); |
|
|
|
|
|
} |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(DUAL_X_CARRIAGE) |
|
|
|
|
|
|
|
|
|
|
|
void menu_idex() { |
|
|
START_MENU(); |
|
|
START_MENU(); |
|
|
MENU_BACK(MSG_MAIN); |
|
|
MENU_BACK(MSG_MAIN); |
|
|
|
|
|
|
|
@ -146,10 +164,6 @@ static void lcd_factory_settings() { |
|
|
: PSTR("M605 S1\nT0\nM605 S2 X200\nG28 X\nG1 X100\nM605 S3 X200") |
|
|
: PSTR("M605 S1\nT0\nM605 S2 X200\nG28 X\nG1 X100\nM605 S3 X200") |
|
|
); |
|
|
); |
|
|
MENU_ITEM(gcode, MSG_IDEX_MODE_FULL_CTRL, PSTR("M605 S0\nG28 X")); |
|
|
MENU_ITEM(gcode, MSG_IDEX_MODE_FULL_CTRL, PSTR("M605 S0\nG28 X")); |
|
|
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float52, MSG_IDEX_X_OFFSET , &hotend_offset[X_AXIS][1], MIN(X2_HOME_POS, X2_MAX_POS) - 25.0, MAX(X2_HOME_POS, X2_MAX_POS) + 25.0, _recalc_IDEX_settings); |
|
|
|
|
|
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float52, MSG_IDEX_Y_OFFSET , &hotend_offset[Y_AXIS][1], -10.0, 10.0, _recalc_IDEX_settings); |
|
|
|
|
|
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float52, MSG_IDEX_Z_OFFSET , &hotend_offset[Z_AXIS][1], -10.0, 10.0, _recalc_IDEX_settings); |
|
|
|
|
|
MENU_ITEM(gcode, MSG_IDEX_SAVE_OFFSETS, PSTR("M500")); |
|
|
|
|
|
END_MENU(); |
|
|
END_MENU(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -287,8 +301,12 @@ void menu_configuration() { |
|
|
MENU_ITEM(submenu, MSG_DELTA_CALIBRATE, menu_delta_calibrate); |
|
|
MENU_ITEM(submenu, MSG_DELTA_CALIBRATE, menu_delta_calibrate); |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#if HAS_HOTEND_OFFSET |
|
|
|
|
|
MENU_ITEM(submenu, MSG_OFFSETS_MENU, menu_tool_offsets); |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
#if ENABLED(DUAL_X_CARRIAGE) |
|
|
#if ENABLED(DUAL_X_CARRIAGE) |
|
|
MENU_ITEM(submenu, MSG_IDEX_MENU, menu_IDEX); |
|
|
MENU_ITEM(submenu, MSG_IDEX_MENU, menu_idex); |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if ENABLED(BLTOUCH) |
|
|
#if ENABLED(BLTOUCH) |
|
|