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

5 axis with rotation fails to compile. #26335

Closed
1 task done
ellensp opened this issue Oct 11, 2023 · 2 comments · Fixed by #26174 · May be fixed by #24334
Closed
1 task done

5 axis with rotation fails to compile. #26335

ellensp opened this issue Oct 11, 2023 · 2 comments · Fixed by #26174 · May be fixed by #24334

Comments

@ellensp
Copy link
Contributor

ellensp commented Oct 11, 2023

Did you test the latest bugfix-2.1.x code?

Yes, and the problem still exists.

Bug Description

Marlin/src/module/motion.cpp:1164:83: error: 'const xyze_pos_t {aka const struct XYZEval<float>}' has no member named 'k'
           distance_sqr = ROTATIONAL_AXIS_GANG(sq(diff.i), + sq(diff.j), + sq(diff.k), + sq(diff.u), + sq(diff.v), + sq(diff.w));
                                                                                   ^

Expected behavior

It should build

Actual behavior

It has a compile error.

Steps to Reproduce

  1. Download https://github.com/MarlinFirmware/Configurations/tree/bugfix-2.1.x/config/examples/linear_axes/RAMPS%205%20LINEAR_AXES
  2. replace default Config files with these configs
  3. add #define AXIS4_ROTATES to Configuration.h
  4. build

Version of Marlin Firmware

Bugfix-2.1.x

Electronics

RAMPS

Don't forget to include

  • A ZIP file containing your Configuration.h and Configuration_adv.h.

Additional information & file uploads

Configuration.zip

Error comes from types.h, it has this code

#if HAS_ROTATIONAL_AXES
  #define ROTATIONAL_AXIS_GANG(V...) GANG_N(ROTATIONAL_AXES, V)
#endif

But this define is not called as HAS_ROTATIONAL_AXES is not set yet

#If HAS_ROTATIONAL_AXES is also used in Configuration_adv.h
But is also not working as it is not set yet.

HAS_ROTATIONAL_AXES is set in inc/Conditionals_post.h to late.

related

#26220
https://reprap.org/forum/read.php?146,893571,893596#msg-893596

@DerAndere1
Copy link
Contributor

This was first reported in #26002 and should be fixed with either of the pull requests linked above.

@ellensp ellensp closed this as completed Oct 20, 2023
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants