Skip to content

[wpimath] fix null pointer when calling timeLeftUntill #7894

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

me-it-is
Copy link

@me-it-is me-it-is commented Apr 8, 2025

Fixes the null pointer and adds docs to clarify the return value in this case or when calling totalTime.

@me-it-is me-it-is requested a review from a team as a code owner April 8, 2025 21:43
@github-actions github-actions bot added the component: wpimath Math library label Apr 8, 2025
@me-it-is me-it-is changed the title [wpimath] fix null pointer when calling timeLeftUntill [wpimath] fix null pointer when calling timeLeftUntill closes #6452 Apr 8, 2025
@me-it-is me-it-is changed the title [wpimath] fix null pointer when calling timeLeftUntill closes #6452 [wpimath] fix null pointer when calling timeLeftUntill Apr 8, 2025
Copy link
Member

@calcmogul calcmogul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You forgot to update comments in the C++ version as well.

@me-it-is
Copy link
Author

me-it-is commented Apr 8, 2025

Closes #6452

calcmogul
calcmogul previously approved these changes Apr 9, 2025
@calcmogul
Copy link
Member

calcmogul commented Apr 9, 2025

The C++ compiler says there's some other initialization bugs to fix. wpiformat CI has a patch file you can apply to fix the formatting.

Copy link
Member

@calcmogul calcmogul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TrapezoidProfile.h should also initialize m_endAccel, m_endFullSpeed, and m_endDecel to 0_s.

calcmogul
calcmogul previously approved these changes Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants