Skip to content

Commit

Permalink
Update - revert ProEx functions
Browse files Browse the repository at this point in the history
  • Loading branch information
classicrocker883 committed Nov 18, 2024
1 parent de02fc6 commit 3f2176c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Marlin/src/gcode/probe/M851.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void GcodeSuite::M851() {
// Save the new offsets
if (ok) {
probe.offset = offs;
TERN_(PROUI_EX, ApplyPhySet();)
TERN_(PROUI_EX, ProEx.ApplyPhySet();)
}
}

Expand Down
29 changes: 15 additions & 14 deletions Marlin/src/lcd/e3v2/proui/dwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2161,7 +2161,7 @@ void DWIN_SetDataDefaults() {
const uint8_t _def[] = DEF_TBOPT;
for (uint8_t i = 0; i < TBMaxOpt; ++i) PRO_data.TBopt[i] = _def[i];
#endif
SetData();
ProEx.SetData();
#else
#if HAS_BED_PROBE
HMI_data.zprobefeedslow = DEF_Z_PROBE_FEEDRATE_SLOW;
Expand Down Expand Up @@ -2189,7 +2189,9 @@ void DWIN_CopySettingsFrom(PGM_P const buff) {
DEBUG_ECHOLNPGM("DWIN_CopySettingsFrom");
memcpy(&HMI_data, buff, sizeof(HMI_data_t));
TERN_(PROUI_EX, memcpy(&PRO_data, buff + sizeof(HMI_data_t), sizeof(PRO_data_t));)
#if ANY(PROUI_EX, MESH_BED_LEVELING)
#if PROUI_EX
ProEx.SetData();
#elif ENABLED(MESH_BED_LEVELING)
SetData();
#endif
DWINUI::SetColors(HMI_data.Text_Color, HMI_data.Background_Color, HMI_data.TitleBg_Color);
Expand Down Expand Up @@ -2568,8 +2570,8 @@ void ApplyMove() {

#if HAS_BED_PROBE

void SetProbeOffsetX() { SetPFloatOnClick(-60, 60, UNITFDIGITS, TERN(PROUI_EX, ApplyPhySet, nullptr)); }
void SetProbeOffsetY() { SetPFloatOnClick(-60, 60, UNITFDIGITS, TERN(PROUI_EX, ApplyPhySet, nullptr)); }
void SetProbeOffsetX() { SetPFloatOnClick(-60, 60, UNITFDIGITS, TERN(PROUI_EX, ProEx.ApplyPhySet, nullptr)); }
void SetProbeOffsetY() { SetPFloatOnClick(-60, 60, UNITFDIGITS, TERN(PROUI_EX, ProEx.ApplyPhySet, nullptr)); }
void SetProbeOffsetZ() { SetPFloatOnClick(-10, 10, 2); }
void SetProbeZSpeed() { SetPIntOnClick(60, 1000); }
#if DISABLED(BD_SENSOR)
Expand Down Expand Up @@ -3117,10 +3119,9 @@ void ApplyMaxAccel() { planner.set_max_acceleration(HMI_value.axis, MenuData.Val
#endif
#endif

#if ANY(PROUI_EX, MESH_BED_LEVELING)
#if !PROUI_EX && ENABLED(MESH_BED_LEVELING)
void ApplyPhySet() {
TERN_(PROUI_EX, ProEx.CheckParkingPos();)
TERN_(MESH_BED_LEVELING, bedlevel.initialize();)
bedlevel.initialize();
update_software_endstops(X_AXIS);
update_software_endstops(Y_AXIS);
update_software_endstops(Z_AXIS);
Expand All @@ -3131,13 +3132,13 @@ void ApplyMaxAccel() { planner.set_max_acceleration(HMI_value.axis, MenuData.Val
#endif

#if PROUI_EX
void SetBedSizeX() { HMI_value.axis = NO_AXIS_ENUM; SetPIntOnClick(X_BED_MIN, X_MAX_POS, ApplyPhySet); }
void SetBedSizeY() { HMI_value.axis = NO_AXIS_ENUM; SetPIntOnClick(Y_BED_MIN, Y_MAX_POS, ApplyPhySet); }
void SetMinPosX() { HMI_value.axis = X_AXIS; SetPIntOnClick( -100, 100, ApplyPhySet); }
void SetMinPosY() { HMI_value.axis = Y_AXIS; SetPIntOnClick( -100, 100, ApplyPhySet); }
void SetMaxPosX() { HMI_value.axis = X_AXIS; SetPIntOnClick(X_BED_MIN, 999, ApplyPhySet); }
void SetMaxPosY() { HMI_value.axis = Y_AXIS; SetPIntOnClick(Y_BED_MIN, 999, ApplyPhySet); }
void SetMaxPosZ() { HMI_value.axis = Z_AXIS; SetPIntOnClick( 100, 999, ApplyPhySet); }
void SetBedSizeX() { HMI_value.axis = NO_AXIS_ENUM; SetPIntOnClick(X_BED_MIN, X_MAX_POS, ProEx.ApplyPhySet); }
void SetBedSizeY() { HMI_value.axis = NO_AXIS_ENUM; SetPIntOnClick(Y_BED_MIN, Y_MAX_POS, ProEx.ApplyPhySet); }
void SetMinPosX() { HMI_value.axis = X_AXIS; SetPIntOnClick( -100, 100, ProEx.ApplyPhySet); }
void SetMinPosY() { HMI_value.axis = Y_AXIS; SetPIntOnClick( -100, 100, ProEx.ApplyPhySet); }
void SetMaxPosX() { HMI_value.axis = X_AXIS; SetPIntOnClick(X_BED_MIN, 999, ProEx.ApplyPhySet); }
void SetMaxPosY() { HMI_value.axis = Y_AXIS; SetPIntOnClick(Y_BED_MIN, 999, ProEx.ApplyPhySet); }
void SetMaxPosZ() { HMI_value.axis = Z_AXIS; SetPIntOnClick( 100, 999, ProEx.ApplyPhySet); }
#endif

#if HAS_EXTRUDERS
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/e3v2/proui/dwin.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ void ResetEeprom();
#if ALL(HAS_BLTOUCH_HS_MODE, HS_MENU_ITEM)
void SetHSMode();
#endif
#if ANY(PROUI_EX, MESH_BED_LEVELING)
#if !PROUI_EX && ENABLED(MESH_BED_LEVELING)
void ApplyPhySet();
void SetData();
#endif
Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/module/motion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1430,11 +1430,11 @@ void restore_feedrate_and_scaling() {
OPTARG(HAS_HOTEND_OFFSET, const uint8_t old_tool_index/*=0*/, const uint8_t new_tool_index/*=0*/)
) {

// #if PROUI_EX
#if PROUI_EX

// ProEx.UpdateAxis(axis);
ProEx.UpdateAxis(axis);

#if ENABLED(DUAL_X_CARRIAGE)
#elif ENABLED(DUAL_X_CARRIAGE)

if (axis == X_AXIS) {

Expand Down

0 comments on commit 3f2176c

Please sign in to comment.