-
Notifications
You must be signed in to change notification settings - Fork 640
[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
base: main
Are you sure you want to change the base?
Conversation
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.
You forgot to update comments in the C++ version as well.
wpimath/src/main/java/edu/wpi/first/math/trajectory/TrapezoidProfile.java
Outdated
Show resolved
Hide resolved
wpimath/src/test/native/cpp/trajectory/TrapezoidProfileTest.cpp
Outdated
Show resolved
Hide resolved
wpimath/src/test/java/edu/wpi/first/math/trajectory/TrapezoidProfileTest.java
Outdated
Show resolved
Hide resolved
wpimath/src/main/java/edu/wpi/first/math/trajectory/TrapezoidProfile.java
Outdated
Show resolved
Hide resolved
wpimath/src/main/java/edu/wpi/first/math/trajectory/TrapezoidProfile.java
Outdated
Show resolved
Hide resolved
Closes #6452 |
wpimath/src/main/native/include/frc/trajectory/TrapezoidProfile.h
Outdated
Show resolved
Hide resolved
wpimath/src/test/native/cpp/trajectory/TrapezoidProfileTest.cpp
Outdated
Show resolved
Hide resolved
wpimath/src/test/java/edu/wpi/first/math/trajectory/TrapezoidProfileTest.java
Outdated
Show resolved
Hide resolved
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. |
3f07ca8
to
02fde3c
Compare
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.
TrapezoidProfile.h should also initialize m_endAccel
, m_endFullSpeed
, and m_endDecel
to 0_s
.
Fixes the null pointer and adds docs to clarify the return value in this case or when calling totalTime.