Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove + swap PLANNER_XY_FEEDRATE_MM_S w/ XY_PROBE_FEEDRATE_MM_S #27411

Open
wants to merge 4 commits into
base: bugfix-2.1.x
Choose a base branch
from

Conversation

classicrocker883
Copy link
Contributor

@classicrocker883 classicrocker883 commented Sep 9, 2024

Description

This PR removes and replaces PLANNER_XY_FEEDRATE_MM_S w/ XY_PROBE_FEEDRATE_MM_S

Something that stood out to me is planner.settings.max_feedrate_mm_s[*_AXIS], which is defined by DEFAULT_MAX_FEEDRATE, which X/Y_AXIS is usually something in the hundreds.

However, in motion.h, we have:

#if HAS_ABL_NOT_UBL
  extern feedRate_t xy_probe_feedrate_mm_s;
  #define XY_PROBE_FEEDRATE_MM_S xy_probe_feedrate_mm_s
#elif defined(XY_PROBE_FEEDRATE)                    // has a probe
  #define XY_PROBE_FEEDRATE_MM_S MMM_TO_MMS(XY_PROBE_FEEDRATE)
#else                                               // has No probe
  #define XY_PROBE_FEEDRATE_MM_S PLANNER_XY_FEEDRATE_MM_S
#endif

so when not using a probe it is #define XY_PROBE_FEEDRATE_MM_S PLANNER_XY_FEEDRATE_MM_S
and PLANNER_XY_FEEDRATE_MM_S can be:
(from planner.h)

#if HAS_Y_AXIS
  #define PLANNER_XY_FEEDRATE_MM_S _MIN(planner.settings.max_feedrate_mm_s[X_AXIS], planner.settings.max_feedrate_mm_s[Y_AXIS])
#elif HAS_X_AXIS
  #define PLANNER_XY_FEEDRATE_MM_S planner.settings.max_feedrate_mm_s[X_AXIS]
#else
  #define PLANNER_XY_FEEDRATE_MM_S 60.0f
#endif

so basically, PLANNER_XY_FEEDRATE_MM_S should be something like "60", but being defined as max_feedrate_mm_s in the hundreds doesn't make sense. so XY_PROBE_FEEDRATE_MM_S = PLANNER_XY_FEEDRATE_MM_S = max_feedrate_mm_s doesn't make sense.

that is why XY_PROBE_FEEDRATE_MM_S should be XY_PROBE_FEEDRATE, which is ((homing_feedrate_mm_m.x + homing_feedrate_mm_m.y) / 2), and homing_feedrate_mm_m = HOMING_FEEDRATE_MM_M = { (50*60), (50*60), (4*60) }

Requirements

Benefits

Configurations

Related Issues

@thinkyhead thinkyhead force-pushed the bugfix-2.1.x branch 3 times, most recently from 37d77d6 to aa44542 Compare September 28, 2024 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant