-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
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
Planner trapezoidal nominal_rate fix #26881
Merged
thinkyhead
merged 33 commits into
MarlinFirmware:bugfix-2.1.x
from
HoverClub:Trap-nominal-fix
Jul 13, 2024
Merged
Changes from 8 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
f4562be
Fix planner wrong trap generation
HoverClub a7a4152
Update planner.cpp
HoverClub 0257384
Update planner.h
HoverClub cdb0b1c
Update planner.h
HoverClub 3b887b4
Update planner.h
HoverClub 0c8c741
Merge branch 'MarlinFirmware:bugfix-2.1.x' into Trap-nominal-fix
HoverClub 5e0158a
Update planner.cpp
HoverClub 3da5d0c
Update planner.h
HoverClub ddf9681
Merge branch 'bugfix-2.1.x' into pr/26881
thinkyhead 9f2b99b
Revert "Update planner.cpp"
HoverClub 22f7de5
Update planner.cpp
HoverClub 2d46cc3
Update planner.h
HoverClub e2ecb03
Update planner.cpp
HoverClub 8556962
Merge branch 'bugfix-2.1.x' into pr/26881
thinkyhead bf5a532
ws
thinkyhead 2396c0f
Apply to min_step_rate
thinkyhead a67be24
misc cosmetics
thinkyhead db58fa9
Merge branch 'bugfix-2.1.x' into pr/26881
thinkyhead e5cb811
Merge branch 'bugfix-2.1.x' into pr/26881
thinkyhead 551dfa2
comment
thinkyhead 7c6daa7
allow merge sooner
thinkyhead f2d6cfd
not needed
thinkyhead e7d301f
Merge branch 'bugfix-2.1.x' into pr/26881
thinkyhead cd6b8c8
use _MAX, remove NOMOREs
thinkyhead 481369e
tweak
thinkyhead a63df47
type happy
thinkyhead 65af7d2
shorten lines
thinkyhead fe400a2
hygdmfsc
thinkyhead 83697e9
Merge branch 'bugfix-2.1.x' into pr/26881
thinkyhead c32f6c6
merge followup
thinkyhead 03ef8d2
keep comment
thinkyhead 02f9dc0
followup
thinkyhead 3b27a8e
Merge branch 'bugfix-2.1.x' into pr/26881
thinkyhead File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tombrazier in the latest diff MINMAL_STEP_RATE and these limits are removed entirely.
Are you confident that this is a correct thing to do, and that
Otherwise the timer will overflow
is just an obsolete relic?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I imagine we should have some testing on this in its final form before merging it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe there is likely a need to limit the minimum with AVR HAL hardware timers e.g. ATM2560 etc.
see https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.1.x/Marlin/src/HAL/AVR/timers.h
Don't think you can remove them entirely.
regards @descipher
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not confident enough to merge it without testing. I am fairly sure it is redundant but it needs to be tried.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to add some code to the test suite that would run a set of values from very small to very large through routines like this to ensure they don't overflow. Meanwhile, those with questions about a math routine can use the Simulator or make a set of test files — e.g.,
test.h
,test.cpp
— containing only the Marlin routines that need checking, plus the supporting types, etc. I have just such a set of files that I've occasionally used to figure out macro behavior and things like that.With that sage advice out of the way, has anyone explored and tested for overflow/underflow yet?