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

introduce get_distance function #25370

Merged
merged 5 commits into from
Feb 21, 2023

Conversation

DerAndere1
Copy link
Contributor

@DerAndere1 DerAndere1 commented Feb 12, 2023

Description

Split off from #24334. The new get_distance function calculates distance from axis displacements and also updates a flag that is passed by reference as parameter is_cartesian_move. An alternative solution would be a function that returns a struct that would be defined like this:

typedef struct Move { 
  float distance;
  #if HAS_ROTATIONAL_AXES
    bool is_cartesian = true;
  #endif
} move_t;

Requirements

None

Benefits

Makes distance- and feedrate calculation more consistent across features. Prepare kinematic logic for true continuous multi-axis machining.

Configurations

TODO

Related Issues

#23116

@DerAndere1 DerAndere1 force-pushed the get_distance branch 5 times, most recently from ef39f9c to 68b5c26 Compare February 13, 2023 22:38
@thinkyhead thinkyhead merged commit babd3b0 into MarlinFirmware:bugfix-2.1.x Feb 21, 2023
mikezs added a commit to mikezs/Marlin that referenced this pull request Feb 27, 2023
* bugfix-2.1.x: (113 commits)
  [cron] Bump distribution date (2023-02-27)
  ✨ LCD_BACKLIGHT_TIMEOUT for Neopixel LCD (MarlinFirmware#25438)
  🔨 Fix env STM32G0B1RE_btt, add …_manta_btt (MarlinFirmware#25431)
  🩹 Native types for RTS overloads (MarlinFirmware#25440)
  📝 Link to archived RA Control Panel page (MarlinFirmware#25424)
  📝 New URL for IA_CREALITY DWIN files  (MarlinFirmware#25423)
  [cron] Bump distribution date (2023-02-24)
  📝 Update DISABLE_INACTIVE_* comment
  🎨 Use LIMIT macro
  ⚡️ Reduce edit_screen code size (MarlinFirmware#25420)
  ♻️ Stepper options refactor (MarlinFirmware#25422)
  [cron] Bump distribution date (2023-02-23)
  🔧 Fix Einsy Rambo TMC driver check
  🔨 Fix marlin_custom.* without lib_deps
  [cron] Bump distribution date (2023-02-22)
  🐛 Fix AVR maths used by Stepper (MarlinFirmware#25338)
  🔨 Encrypt some MKS Robin (MarlinFirmware#25349)
  🌐 Update Russian language (MarlinFirmware#25360)
  🧑‍💻 Fix preheat tests (nested macro limit ~256)
  🧑‍💻 Add get_move_distance for rotation/kinematics (MarlinFirmware#25370)
  ...

# Conflicts:
#	Marlin/Configuration_adv.h
Andy-Big pushed a commit to Andy-Big/Marlin_FB_Reborn that referenced this pull request Jul 9, 2023
@DerAndere1 DerAndere1 deleted the get_distance branch October 1, 2024 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants