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

CJ-JD Leftover Code Cleanup #20639

Closed

Conversation

qwewer0
Copy link
Contributor

@qwewer0 qwewer0 commented Jan 2, 2021

Description

Leftover Classic Jerk and Junction Deviation code cleanup.

There might be more, but I wasn't able to find any.

Benefits

Less junk.

Modification explanation

Marlin/src/inc/Conditionals_LCD.h
There is no need to check for IS_KINEMATIC:
https://github.com/qwewer0/Marlin/blob/c3350c1945f46c249b37b0431f25b3e197698625/Marlin/src/inc/SanityCheck.h#L1244-L1249

Marlin/src/inc/SanityCheck.h
Use BOTH() instead.

Marlin/src/lcd/menu/menu_advanced.cpp, Marlin/src/module/planner.cpp
Inside HAS_CLASSIC_JERK there is no need to check for HAS_JUNCTION_DEVIATION:
https://github.com/qwewer0/Marlin/blob/c3350c1945f46c249b37b0431f25b3e197698625/Marlin/src/inc/Conditionals_LCD.h#L948-L952

Removing HAS_DIST_MM_ARG:
Marlin/src/module/motion.cpp, Marlin/src/module/planner.cpp, Marlin/src/module/planner.h
HAS_JUNCTION_DEVIATION cannot be enabled with IS_KINEMATIC:
https://github.com/qwewer0/Marlin/blob/c3350c1945f46c249b37b0431f25b3e197698625/Marlin/src/inc/SanityCheck.h#L1244-L1249

@thinkyhead
Copy link
Member

Even when a kinematic machine (delta) is using Junction Deviation it also has "classic jerk" on the E axis at the same time (unless using linear advance). You'll see that HAS_CLASSIC_E_JERK is set when you're on a kinematic system, even if classic jerk is not explicitly enabled.

@qwewer0
Copy link
Contributor Author

qwewer0 commented Jan 3, 2021

Even when a kinematic machine (delta) is using Junction Deviation it also has "classic jerk" on the E axis at the same time (unless using linear advance). You'll see that HAS_CLASSIC_E_JERK is set when you're on a kinematic system, even if classic jerk is not explicitly enabled.

Then the sanitycheck is wrong? Because that doesn't allows HAS_JUNCTION_DEVIATION (CLASSIC_JERK disabled) and IS_KINEMATIC to be enabled at the same time:

Junction deviation is incompatible with kinematic systems.

https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.0.x/Marlin/src/inc/Conditionals_LCD.h#L952-L954
https://github.com/qwewer0/Marlin/blob/bugfix-2.0.x/Marlin/src/inc/SanityCheck.h#L1184-L1189

@thinkyhead
Copy link
Member

Then the sanitycheck is wrong?

Yes, it's possible I was hasty in merging #15032.

@qwewer0
Copy link
Contributor Author

qwewer0 commented Jan 3, 2021

Then the sanitycheck is wrong?

Yes, it's possible I was hasty in merging #15032.

Got it 👍
I will close this then.

@qwewer0 qwewer0 closed this Jan 3, 2021
@qwewer0 qwewer0 deleted the Remove_Redundant_Code branch January 3, 2021 10:53
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.

2 participants