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

Make TrapezoidProfile.State and ExponentialProfile.State implement StructSerializable #7720

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

Conversation

Daniel1464
Copy link
Contributor

No description provided.

@Daniel1464 Daniel1464 requested a review from a team as a code owner January 23, 2025 19:52
@github-actions github-actions bot added the component: wpimath Math library label Jan 23, 2025
@calcmogul calcmogul added the help: needs C++ Java exists, needs C++ port label Jan 23, 2025
Copy link
Contributor

@KangarooKoala KangarooKoala left a comment

Choose a reason for hiding this comment

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

Nice work! However, this will also need tests and preferably protobuf support as well.


@Override
public String getTypeName() {
return "TrapezoidProfile.State";
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return "TrapezoidProfile.State";
return "ExponentialProfileState";

The type name can't contain .. Note that Trajectory.State was named TrajectoryState in https://github.com/wpilibsuite/allwpilib/blob/main/wpimath/src/main/proto/trajectory.proto>.


@Override
public String getTypeName() {
return "TrapezoidProfile.State";
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return "TrapezoidProfile.State";
return "TrapezoidProfileState";

@@ -129,6 +131,9 @@ public static Constraints fromStateSpace(double maxInput, double A, double B) {

/** Profile state. */
public static class State {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
public static class State {
public static class State implements StructSerializable {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: wpimath Math library help: needs C++ Java exists, needs C++ port
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants