mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-30 07:17:59 +00:00
🩹 ProUI - Remove ManualZOffset
This commit is contained in:
parent
7717beb793
commit
01e58de31a
@ -1298,6 +1298,7 @@
|
||||
// Clear probe pin settings when no probe is selected
|
||||
#undef Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
|
||||
#undef USE_PROBE_FOR_Z_HOMING
|
||||
#undef Z_MIN_PROBE_REPEATABILITY_TEST
|
||||
#endif
|
||||
|
||||
#if ENABLED(BELTPRINTER) && !defined(HOME_Y_BEFORE_X)
|
||||
|
@ -79,6 +79,9 @@
|
||||
#define SERVO_DELAY { 50 }
|
||||
#endif
|
||||
|
||||
#if !HAS_BED_PROBE
|
||||
#undef BABYSTEP_ZPROBE_OFFSET
|
||||
#endif
|
||||
#if !HAS_STOWABLE_PROBE
|
||||
#undef PROBE_DEPLOY_STOW_MENU
|
||||
#endif
|
||||
|
@ -1938,15 +1938,17 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
* Make sure Z raise values are set
|
||||
*/
|
||||
#ifndef Z_CLEARANCE_DEPLOY_PROBE
|
||||
#error "You must define Z_CLEARANCE_DEPLOY_PROBE in your configuration."
|
||||
#elif !defined(Z_CLEARANCE_BETWEEN_PROBES)
|
||||
#error "You must define Z_CLEARANCE_BETWEEN_PROBES in your configuration."
|
||||
#elif Z_CLEARANCE_DEPLOY_PROBE < 0
|
||||
#error "Probes need Z_CLEARANCE_DEPLOY_PROBE >= 0."
|
||||
#elif Z_CLEARANCE_BETWEEN_PROBES < 0
|
||||
#error "Probes need Z_CLEARANCE_BETWEEN_PROBES >= 0."
|
||||
#elif Z_AFTER_PROBING < 0
|
||||
#error "Probes need Z_AFTER_PROBING >= 0."
|
||||
#error "Z_CLEARANCE_DEPLOY_PROBE is required for bed probes."
|
||||
#else
|
||||
static_assert(Z_CLEARANCE_DEPLOY_PROBE >= 0, "Probes require Z_CLEARANCE_DEPLOY_PROBE >= 0.");
|
||||
#endif
|
||||
#ifndef Z_CLEARANCE_BETWEEN_PROBES
|
||||
#error "Z_CLEARANCE_BETWEEN_PROBES is required for bed probes."
|
||||
#else
|
||||
static_assert(Z_CLEARANCE_BETWEEN_PROBES >= 0, "Probes require Z_CLEARANCE_BETWEEN_PROBES >= 0.");
|
||||
#endif
|
||||
#ifdef Z_AFTER_PROBING
|
||||
static_assert(Z_AFTER_PROBING >= 0, "Probes require Z_AFTER_PROBING >= 0.");
|
||||
#endif
|
||||
|
||||
#if MULTIPLE_PROBING > 0 || EXTRA_PROBING > 0
|
||||
|
@ -109,14 +109,8 @@
|
||||
#include "../../../feature/bltouch.h"
|
||||
#endif
|
||||
|
||||
#if EITHER(BABYSTEPPING, HAS_BED_PROBE)
|
||||
#define HAS_ZOFFSET_ITEM 1
|
||||
#if ENABLED(BABYSTEPPING)
|
||||
#include "../../../feature/babystep.h"
|
||||
#if !HAS_BED_PROBE
|
||||
#define JUST_BABYSTEP 1
|
||||
#endif
|
||||
#endif
|
||||
#if ENABLED(BABYSTEPPING)
|
||||
#include "../../../feature/babystep.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
@ -197,8 +191,8 @@
|
||||
#define DWIN_UPDATE_INTERVAL 1024
|
||||
#define DWIN_REMAIN_TIME_UPDATE_INTERVAL SEC_TO_MS(20)
|
||||
|
||||
#if HAS_MESH
|
||||
#define BABY_Z_VAR TERN(HAS_BED_PROBE, probe.offset.z, HMI_data.ManualZOffset)
|
||||
#if HAS_MESH && HAS_BED_PROBE
|
||||
#define BABY_Z_VAR probe.offset.z
|
||||
#else
|
||||
float z_offset = 0;
|
||||
#define BABY_Z_VAR z_offset
|
||||
@ -1473,10 +1467,6 @@ void DWIN_HomingStart() {
|
||||
|
||||
void DWIN_HomingDone() {
|
||||
HMI_flag.home_flag = false;
|
||||
#if DISABLED(HAS_BED_PROBE) && EITHER(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP)
|
||||
planner.synchronize();
|
||||
babystep.add_mm(Z_AXIS, HMI_data.ManualZOffset);
|
||||
#endif
|
||||
HMI_ReturnScreen();
|
||||
}
|
||||
|
||||
@ -1696,7 +1686,6 @@ void DWIN_SetDataDefaults() {
|
||||
#if BOTH(INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING)
|
||||
HMI_data.z_after_homing = DEF_Z_AFTER_HOMING;
|
||||
#endif
|
||||
IF_DISABLED(HAS_BED_PROBE, HMI_data.ManualZOffset = 0);
|
||||
#if BOTH(LED_CONTROL_MENU, HAS_COLOR_LEDS)
|
||||
TERN_(LED_COLOR_PRESETS, leds.set_default());
|
||||
ApplyLEDColor();
|
||||
|
@ -35,6 +35,13 @@
|
||||
#include "../common/encoder.h"
|
||||
#include "../../../libs/BL24CXX.h"
|
||||
|
||||
#if EITHER(BABYSTEPPING, HAS_BED_PROBE)
|
||||
#define HAS_ZOFFSET_ITEM 1
|
||||
#if !HAS_BED_PROBE
|
||||
#define JUST_BABYSTEP 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace GET_LANG(LCD_LANGUAGE) {
|
||||
#define _MSG_PREHEAT(N) \
|
||||
LSTR MSG_PREHEAT_##N = _UxGT("Preheat ") PREHEAT_## N ##_LABEL; \
|
||||
@ -118,15 +125,12 @@ typedef struct {
|
||||
#if ENABLED(BAUD_RATE_GCODE)
|
||||
bool Baud115K = false;
|
||||
#endif
|
||||
|
||||
bool FullManualTramming = false;
|
||||
bool MediaAutoMount = ENABLED(HAS_SD_EXTENDER);
|
||||
#if BOTH(INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING)
|
||||
uint8_t z_after_homing = DEF_Z_AFTER_HOMING;
|
||||
#endif
|
||||
#if ENABLED(MESH_BED_LEVELING)
|
||||
float ManualZOffset = 0;
|
||||
#endif
|
||||
// Led
|
||||
#if BOTH(LED_CONTROL_MENU, HAS_COLOR_LEDS)
|
||||
LEDColor Led_Color = Def_Leds_Color;
|
||||
#endif
|
||||
|
@ -68,10 +68,12 @@
|
||||
//
|
||||
void _lcd_level_bed_done() {
|
||||
if (!ui.wait_for_move) {
|
||||
#if Z_AFTER_PROBING > 0 && DISABLED(MESH_BED_LEVELING)
|
||||
// Display "Done" screen and wait for moves to complete
|
||||
line_to_z(Z_AFTER_PROBING);
|
||||
ui.synchronize(GET_TEXT_F(MSG_LEVEL_BED_DONE));
|
||||
#if DISABLED(MESH_BED_LEVELING) && defined(Z_AFTER_PROBING)
|
||||
if (Z_AFTER_PROBING) {
|
||||
// Display "Done" screen and wait for moves to complete
|
||||
line_to_z(Z_AFTER_PROBING);
|
||||
ui.synchronize(GET_TEXT_F(MSG_LEVEL_BED_DONE));
|
||||
}
|
||||
#endif
|
||||
ui.goto_previous_screen_no_defer();
|
||||
ui.completion_feedback();
|
||||
|
@ -161,11 +161,9 @@ public:
|
||||
#endif
|
||||
|
||||
static void move_z_after_homing() {
|
||||
#if ALL(DWIN_LCD_PROUI, INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING)
|
||||
do_z_clearance(HMI_data.z_after_homing, true);
|
||||
#elif defined(Z_AFTER_HOMING)
|
||||
do_z_clearance(Z_AFTER_HOMING, true);
|
||||
#elif BOTH(Z_AFTER_PROBING, HAS_BED_PROBE)
|
||||
#if ALL(DWIN_LCD_PROUI, INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING) || defined(Z_AFTER_HOMING)
|
||||
do_z_clearance(Z_POST_CLEARANCE, true);
|
||||
#elif HAS_BED_PROBE
|
||||
move_z_after_probing();
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user