diff --git a/wpimath/src/main/java/edu/wpi/first/math/controller/ArmFeedforward.java b/wpimath/src/main/java/edu/wpi/first/math/controller/ArmFeedforward.java index 32464ece10..cd66696e50 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/controller/ArmFeedforward.java +++ b/wpimath/src/main/java/edu/wpi/first/math/controller/ArmFeedforward.java @@ -16,16 +16,16 @@ import edu.wpi.first.util.struct.StructSerializable; */ public class ArmFeedforward implements ProtobufSerializable, StructSerializable { /** The static gain, in volts. */ - public final double ks; + private final double ks; /** The gravity gain, in volts. */ - public final double kg; + private final double kg; - /** The velocity gain, in volt seconds per radian. */ - public final double kv; + /** The velocity gain, in V/(rad/s). */ + private final double kv; - /** The acceleration gain, in volt seconds² per radian. */ - public final double ka; + /** The acceleration gain, in V/(rad/s²). */ + private final double ka; /** Arm feedforward protobuf for serialization. */ public static final ArmFeedforwardProto proto = new ArmFeedforwardProto(); @@ -69,6 +69,42 @@ public class ArmFeedforward implements ProtobufSerializable, StructSerializable this(ks, kg, kv, 0); } + /** + * Returns the static gain. + * + * @return The static gain, in volts. + */ + public double getKs() { + return ks; + } + + /** + * Returns the gravity gain. + * + * @return The gravity gain, in volts. + */ + public double getKg() { + return kg; + } + + /** + * Returns the velocity gain. + * + * @return The velocity gain, in V/(rad/s). + */ + public double getKv() { + return kv; + } + + /** + * Returns the acceleration gain. + * + * @return The acceleration gain, in V/(rad/s²). + */ + public double getKa() { + return ka; + } + /** * Calculates the feedforward from the gains and setpoints. * diff --git a/wpimath/src/main/java/edu/wpi/first/math/controller/ElevatorFeedforward.java b/wpimath/src/main/java/edu/wpi/first/math/controller/ElevatorFeedforward.java index dc56ece26a..0c943979c0 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/controller/ElevatorFeedforward.java +++ b/wpimath/src/main/java/edu/wpi/first/math/controller/ElevatorFeedforward.java @@ -18,16 +18,16 @@ import edu.wpi.first.util.struct.StructSerializable; */ public class ElevatorFeedforward implements ProtobufSerializable, StructSerializable { /** The static gain. */ - public final double ks; + private final double ks; /** The gravity gain. */ - public final double kg; + private final double kg; /** The velocity gain. */ - public final double kv; + private final double kv; /** The acceleration gain. */ - public final double ka; + private final double ka; /** ElevatorFeedforward protobuf for serialization. */ public static final ElevatorFeedforwardProto proto = new ElevatorFeedforwardProto(); @@ -71,6 +71,42 @@ public class ElevatorFeedforward implements ProtobufSerializable, StructSerializ this(ks, kg, kv, 0); } + /** + * Returns the static gain. + * + * @return The static gain. + */ + public double getKs() { + return ks; + } + + /** + * Returns the gravity gain. + * + * @return The gravity gain. + */ + public double getKg() { + return kg; + } + + /** + * Returns the velocity gain. + * + * @return The velocity gain. + */ + public double getKv() { + return kv; + } + + /** + * Returns the acceleration gain. + * + * @return The acceleration gain. + */ + public double getKa() { + return ka; + } + /** * Calculates the feedforward from the gains and setpoints. * diff --git a/wpimath/src/main/java/edu/wpi/first/math/controller/SimpleMotorFeedforward.java b/wpimath/src/main/java/edu/wpi/first/math/controller/SimpleMotorFeedforward.java index 60accdadf2..f9f86073ee 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/controller/SimpleMotorFeedforward.java +++ b/wpimath/src/main/java/edu/wpi/first/math/controller/SimpleMotorFeedforward.java @@ -14,16 +14,16 @@ import edu.wpi.first.units.Voltage; /** A helper class that computes feedforward outputs for a simple permanent-magnet DC motor. */ public class SimpleMotorFeedforward { /** The static gain. */ - public final double ks; + private final double ks; /** The velocity gain. */ - public final double kv; + private final double kv; /** The acceleration gain. */ - public final double ka; + private final double ka; /** The period. */ - private double m_dt; + private final double m_dt; /** * Creates a new SimpleMotorFeedforward with the specified gains and period. Units of the gain @@ -80,6 +80,42 @@ public class SimpleMotorFeedforward { this(ks, kv, 0, 0.020); } + /** + * Returns the static gain. + * + * @return The static gain. + */ + public double getKs() { + return ks; + } + + /** + * Returns the velocity gain. + * + * @return The velocity gain. + */ + public double getKv() { + return kv; + } + + /** + * Returns the acceleration gain. + * + * @return The acceleration gain. + */ + public double getKa() { + return ka; + } + + /** + * Returns the period. + * + * @return The period in seconds. + */ + public double getDt() { + return m_dt; + } + /** * Calculates the feedforward from the gains and setpoints. * diff --git a/wpimath/src/main/java/edu/wpi/first/math/controller/proto/ArmFeedforwardProto.java b/wpimath/src/main/java/edu/wpi/first/math/controller/proto/ArmFeedforwardProto.java index ef3953a54d..fe3ce5757e 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/controller/proto/ArmFeedforwardProto.java +++ b/wpimath/src/main/java/edu/wpi/first/math/controller/proto/ArmFeedforwardProto.java @@ -32,9 +32,9 @@ public class ArmFeedforwardProto implements Protobuf { @Override public void pack(ByteBuffer bb, ArmFeedforward value) { - bb.putDouble(value.ks); - bb.putDouble(value.kg); - bb.putDouble(value.kv); - bb.putDouble(value.ka); + bb.putDouble(value.getKs()); + bb.putDouble(value.getKg()); + bb.putDouble(value.getKv()); + bb.putDouble(value.getKa()); } } diff --git a/wpimath/src/main/java/edu/wpi/first/math/controller/struct/ElevatorFeedforwardStruct.java b/wpimath/src/main/java/edu/wpi/first/math/controller/struct/ElevatorFeedforwardStruct.java index f8b5559530..06e2126668 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/controller/struct/ElevatorFeedforwardStruct.java +++ b/wpimath/src/main/java/edu/wpi/first/math/controller/struct/ElevatorFeedforwardStruct.java @@ -40,9 +40,9 @@ public class ElevatorFeedforwardStruct implements Struct { @Override public void pack(ByteBuffer bb, ElevatorFeedforward value) { - bb.putDouble(value.ks); - bb.putDouble(value.kg); - bb.putDouble(value.kv); - bb.putDouble(value.ka); + bb.putDouble(value.getKs()); + bb.putDouble(value.getKg()); + bb.putDouble(value.getKv()); + bb.putDouble(value.getKa()); } } diff --git a/wpimath/src/main/native/cpp/controller/proto/ArmFeedforwardProto.cpp b/wpimath/src/main/native/cpp/controller/proto/ArmFeedforwardProto.cpp index 8258ca337d..39c3ab8693 100644 --- a/wpimath/src/main/native/cpp/controller/proto/ArmFeedforwardProto.cpp +++ b/wpimath/src/main/native/cpp/controller/proto/ArmFeedforwardProto.cpp @@ -27,8 +27,8 @@ frc::ArmFeedforward wpi::Protobuf::Unpack( void wpi::Protobuf::Pack( google::protobuf::Message* msg, const frc::ArmFeedforward& value) { auto m = static_cast(msg); - m->set_ks(value.kS.value()); - m->set_kg(value.kG.value()); - m->set_kv(value.kV.value()); - m->set_ka(value.kA.value()); + m->set_ks(value.GetKs().value()); + m->set_kg(value.GetKg().value()); + m->set_kv(value.GetKv().value()); + m->set_ka(value.GetKa().value()); } diff --git a/wpimath/src/main/native/cpp/controller/proto/ElevatorFeedforwardProto.cpp b/wpimath/src/main/native/cpp/controller/proto/ElevatorFeedforwardProto.cpp index b72e9f2634..1eb8c3d0f7 100644 --- a/wpimath/src/main/native/cpp/controller/proto/ElevatorFeedforwardProto.cpp +++ b/wpimath/src/main/native/cpp/controller/proto/ElevatorFeedforwardProto.cpp @@ -27,8 +27,8 @@ frc::ElevatorFeedforward wpi::Protobuf::Unpack( void wpi::Protobuf::Pack( google::protobuf::Message* msg, const frc::ElevatorFeedforward& value) { auto m = static_cast(msg); - m->set_ks(value.kS()); - m->set_kg(value.kG()); - m->set_kv(value.kV()); - m->set_ka(value.kA()); + m->set_ks(value.GetKs().value()); + m->set_kg(value.GetKg().value()); + m->set_kv(value.GetKv().value()); + m->set_ka(value.GetKa().value()); } diff --git a/wpimath/src/main/native/cpp/controller/struct/ArmFeedforwardStruct.cpp b/wpimath/src/main/native/cpp/controller/struct/ArmFeedforwardStruct.cpp index 6b0070cb1e..92b5aefd90 100644 --- a/wpimath/src/main/native/cpp/controller/struct/ArmFeedforwardStruct.cpp +++ b/wpimath/src/main/native/cpp/controller/struct/ArmFeedforwardStruct.cpp @@ -26,8 +26,8 @@ frc::ArmFeedforward StructType::Unpack(std::span data) { void StructType::Pack(std::span data, const frc::ArmFeedforward& value) { - wpi::PackStruct(data, value.kS()); - wpi::PackStruct(data, value.kG()); - wpi::PackStruct(data, value.kV()); - wpi::PackStruct(data, value.kA()); + wpi::PackStruct(data, value.GetKs().value()); + wpi::PackStruct(data, value.GetKg().value()); + wpi::PackStruct(data, value.GetKv().value()); + wpi::PackStruct(data, value.GetKa().value()); } diff --git a/wpimath/src/main/native/cpp/controller/struct/ElevatorFeedforwardStruct.cpp b/wpimath/src/main/native/cpp/controller/struct/ElevatorFeedforwardStruct.cpp index ff28357bbb..82799f69c3 100644 --- a/wpimath/src/main/native/cpp/controller/struct/ElevatorFeedforwardStruct.cpp +++ b/wpimath/src/main/native/cpp/controller/struct/ElevatorFeedforwardStruct.cpp @@ -26,8 +26,8 @@ frc::ElevatorFeedforward StructType::Unpack(std::span data) { void StructType::Pack(std::span data, const frc::ElevatorFeedforward& value) { - wpi::PackStruct(data, value.kS()); - wpi::PackStruct(data, value.kG()); - wpi::PackStruct(data, value.kV()); - wpi::PackStruct(data, value.kA()); + wpi::PackStruct(data, value.GetKs().value()); + wpi::PackStruct(data, value.GetKg().value()); + wpi::PackStruct(data, value.GetKv().value()); + wpi::PackStruct(data, value.GetKa().value()); } diff --git a/wpimath/src/main/native/include/frc/controller/ArmFeedforward.h b/wpimath/src/main/native/include/frc/controller/ArmFeedforward.h index 28713003c9..2e986a9baa 100644 --- a/wpimath/src/main/native/include/frc/controller/ArmFeedforward.h +++ b/wpimath/src/main/native/include/frc/controller/ArmFeedforward.h @@ -192,17 +192,46 @@ class WPILIB_DLLEXPORT ArmFeedforward { return MaxAchievableAcceleration(-maxVoltage, angle, velocity); } + /** + * Returns the static gain. + * + * @return The static gain. + */ + units::volt_t GetKs() const { return kS; } + + /** + * Returns the gravity gain. + * + * @return The gravity gain. + */ + units::volt_t GetKg() const { return kG; } + + /** + * Returns the velocity gain. + * + * @return The velocity gain. + */ + units::unit_t GetKv() const { return kV; } + + /** + * Returns the acceleration gain. + * + * @return The acceleration gain. + */ + units::unit_t GetKa() const { return kA; } + + private: /// The static gain, in volts. - const units::volt_t kS; + units::volt_t kS; /// The gravity gain, in volts. - const units::volt_t kG; + units::volt_t kG; - /// The velocity gain, in volt seconds per radian. - const units::unit_t kV; + /// The velocity gain, in V/(rad/s)volt seconds per radian. + units::unit_t kV; - /// The acceleration gain, in volt seconds² per radian. - const units::unit_t kA; + /// The acceleration gain, in V/(rad/s²). + units::unit_t kA; }; } // namespace frc diff --git a/wpimath/src/main/native/include/frc/controller/ElevatorFeedforward.h b/wpimath/src/main/native/include/frc/controller/ElevatorFeedforward.h index 07a0499a53..d9edde7796 100644 --- a/wpimath/src/main/native/include/frc/controller/ElevatorFeedforward.h +++ b/wpimath/src/main/native/include/frc/controller/ElevatorFeedforward.h @@ -182,17 +182,46 @@ class ElevatorFeedforward { return MaxAchievableAcceleration(-maxVoltage, velocity); } + /** + * Returns the static gain. + * + * @return The static gain. + */ + units::volt_t GetKs() const { return kS; } + + /** + * Returns the gravity gain. + * + * @return The gravity gain. + */ + units::volt_t GetKg() const { return kG; } + + /** + * Returns the velocity gain. + * + * @return The velocity gain. + */ + units::unit_t GetKv() const { return kV; } + + /** + * Returns the acceleration gain. + * + * @return The acceleration gain. + */ + units::unit_t GetKa() const { return kA; } + + private: /// The static gain. - const units::volt_t kS; + units::volt_t kS; /// The gravity gain. - const units::volt_t kG; + units::volt_t kG; /// The velocity gain. - const units::unit_t kV; + units::unit_t kV; /// The acceleration gain. - const units::unit_t kA; + units::unit_t kA; }; } // namespace frc diff --git a/wpimath/src/main/native/include/frc/controller/SimpleMotorFeedforward.h b/wpimath/src/main/native/include/frc/controller/SimpleMotorFeedforward.h index 1ae1af3df3..b6ed239e78 100644 --- a/wpimath/src/main/native/include/frc/controller/SimpleMotorFeedforward.h +++ b/wpimath/src/main/native/include/frc/controller/SimpleMotorFeedforward.h @@ -245,16 +245,44 @@ class SimpleMotorFeedforward { return MaxAchievableAcceleration(-maxVoltage, velocity); } - /** The static gain. */ - const units::volt_t kS; + /** + * Returns the static gain. + * + * @return The static gain. + */ + units::volt_t GetKs() const { return kS; } - /** The velocity gain. */ - const units::unit_t kV; + /** + * Returns the velocity gain. + * + * @return The velocity gain. + */ + units::unit_t GetKv() const { return kV; } - /** The acceleration gain. */ - const units::unit_t kA; + /** + * Returns the acceleration gain. + * + * @return The acceleration gain. + */ + units::unit_t GetKa() const { return kA; } + + /** + * Returns the period. + * + * @return The period. + */ + units::second_t GetDt() const { return m_dt; } private: + /** The static gain. */ + units::volt_t kS; + + /** The velocity gain. */ + units::unit_t kV; + + /** The acceleration gain. */ + units::unit_t kA; + /** The period. */ units::second_t m_dt; }; diff --git a/wpimath/src/test/java/edu/wpi/first/math/controller/proto/ArmFeedforwardProtoTest.java b/wpimath/src/test/java/edu/wpi/first/math/controller/proto/ArmFeedforwardProtoTest.java index 5c036d5e5f..b3c151476f 100644 --- a/wpimath/src/test/java/edu/wpi/first/math/controller/proto/ArmFeedforwardProtoTest.java +++ b/wpimath/src/test/java/edu/wpi/first/math/controller/proto/ArmFeedforwardProtoTest.java @@ -19,9 +19,9 @@ class ArmFeedforwardProtoTest { ArmFeedforward.proto.pack(proto, DATA); ArmFeedforward data = ArmFeedforward.proto.unpack(proto); - assertEquals(DATA.ks, data.ks); - assertEquals(DATA.kg, data.kg); - assertEquals(DATA.kv, data.kv); - assertEquals(DATA.ka, data.ka); + assertEquals(DATA.getKs(), data.getKs()); + assertEquals(DATA.getKg(), data.getKg()); + assertEquals(DATA.getKv(), data.getKv()); + assertEquals(DATA.getKa(), data.getKa()); } } diff --git a/wpimath/src/test/java/edu/wpi/first/math/controller/proto/ElevatorFeedforwardProtoTest.java b/wpimath/src/test/java/edu/wpi/first/math/controller/proto/ElevatorFeedforwardProtoTest.java index e624afff74..fd2711935e 100644 --- a/wpimath/src/test/java/edu/wpi/first/math/controller/proto/ElevatorFeedforwardProtoTest.java +++ b/wpimath/src/test/java/edu/wpi/first/math/controller/proto/ElevatorFeedforwardProtoTest.java @@ -19,9 +19,9 @@ class ElevatorFeedforwardProtoTest { ElevatorFeedforward.proto.pack(proto, DATA); ElevatorFeedforward data = ElevatorFeedforward.proto.unpack(proto); - assertEquals(DATA.ks, data.ks); - assertEquals(DATA.kg, data.kg); - assertEquals(DATA.kv, data.kv); - assertEquals(DATA.ka, data.ka); + assertEquals(DATA.getKs(), data.getKs()); + assertEquals(DATA.getKg(), data.getKg()); + assertEquals(DATA.getKv(), data.getKv()); + assertEquals(DATA.getKa(), data.getKa()); } } diff --git a/wpimath/src/test/java/edu/wpi/first/math/controller/struct/ArmFeedforwardStructTest.java b/wpimath/src/test/java/edu/wpi/first/math/controller/struct/ArmFeedforwardStructTest.java index 42a452dbe7..256a78d241 100644 --- a/wpimath/src/test/java/edu/wpi/first/math/controller/struct/ArmFeedforwardStructTest.java +++ b/wpimath/src/test/java/edu/wpi/first/math/controller/struct/ArmFeedforwardStructTest.java @@ -22,9 +22,9 @@ class ArmFeedforwardStructTest { buffer.rewind(); ArmFeedforward data = ArmFeedforward.struct.unpack(buffer); - assertEquals(DATA.ks, data.ks); - assertEquals(DATA.kg, data.kg); - assertEquals(DATA.kv, data.kv); - assertEquals(DATA.ka, data.ka); + assertEquals(DATA.getKs(), data.getKs()); + assertEquals(DATA.getKg(), data.getKg()); + assertEquals(DATA.getKv(), data.getKv()); + assertEquals(DATA.getKa(), data.getKa()); } } diff --git a/wpimath/src/test/java/edu/wpi/first/math/controller/struct/ElevatorFeedforwardStructTest.java b/wpimath/src/test/java/edu/wpi/first/math/controller/struct/ElevatorFeedforwardStructTest.java index a5a83520de..53de2d1daf 100644 --- a/wpimath/src/test/java/edu/wpi/first/math/controller/struct/ElevatorFeedforwardStructTest.java +++ b/wpimath/src/test/java/edu/wpi/first/math/controller/struct/ElevatorFeedforwardStructTest.java @@ -22,9 +22,9 @@ class ElevatorFeedforwardStructTest { buffer.rewind(); ElevatorFeedforward data = ElevatorFeedforward.struct.unpack(buffer); - assertEquals(DATA.ks, data.ks); - assertEquals(DATA.kg, data.kg); - assertEquals(DATA.kv, data.kv); - assertEquals(DATA.ka, data.ka); + assertEquals(DATA.getKs(), data.getKs()); + assertEquals(DATA.getKg(), data.getKg()); + assertEquals(DATA.getKv(), data.getKv()); + assertEquals(DATA.getKa(), data.getKa()); } } diff --git a/wpimath/src/test/native/cpp/controller/proto/ArmFeedforwardProtoTest.cpp b/wpimath/src/test/native/cpp/controller/proto/ArmFeedforwardProtoTest.cpp index b0e57c78d2..4df8566db2 100644 --- a/wpimath/src/test/native/cpp/controller/proto/ArmFeedforwardProtoTest.cpp +++ b/wpimath/src/test/native/cpp/controller/proto/ArmFeedforwardProtoTest.cpp @@ -26,8 +26,8 @@ TEST(ArmFeedforwardProtoTest, Roundtrip) { ProtoType::Pack(proto, kExpectedData); ArmFeedforward unpacked_data = ProtoType::Unpack(*proto); - EXPECT_EQ(kExpectedData.kS.value(), unpacked_data.kS.value()); - EXPECT_EQ(kExpectedData.kG.value(), unpacked_data.kG.value()); - EXPECT_EQ(kExpectedData.kV.value(), unpacked_data.kV.value()); - EXPECT_EQ(kExpectedData.kA.value(), unpacked_data.kA.value()); + EXPECT_EQ(kExpectedData.GetKs().value(), unpacked_data.GetKs().value()); + EXPECT_EQ(kExpectedData.GetKg().value(), unpacked_data.GetKg().value()); + EXPECT_EQ(kExpectedData.GetKv().value(), unpacked_data.GetKv().value()); + EXPECT_EQ(kExpectedData.GetKa().value(), unpacked_data.GetKa().value()); } diff --git a/wpimath/src/test/native/cpp/controller/proto/ElevatorFeedforwardProtoTest.cpp b/wpimath/src/test/native/cpp/controller/proto/ElevatorFeedforwardProtoTest.cpp index 115a3dcf8b..5ec136f6aa 100644 --- a/wpimath/src/test/native/cpp/controller/proto/ElevatorFeedforwardProtoTest.cpp +++ b/wpimath/src/test/native/cpp/controller/proto/ElevatorFeedforwardProtoTest.cpp @@ -27,8 +27,8 @@ TEST(ElevatorFeedforwardProtoTest, Roundtrip) { ProtoType::Pack(proto, kExpectedData); ElevatorFeedforward unpacked_data = ProtoType::Unpack(*proto); - EXPECT_EQ(kExpectedData.kS.value(), unpacked_data.kS.value()); - EXPECT_EQ(kExpectedData.kG.value(), unpacked_data.kG.value()); - EXPECT_EQ(kExpectedData.kV.value(), unpacked_data.kV.value()); - EXPECT_EQ(kExpectedData.kA.value(), unpacked_data.kA.value()); + EXPECT_EQ(kExpectedData.GetKs().value(), unpacked_data.GetKs().value()); + EXPECT_EQ(kExpectedData.GetKg().value(), unpacked_data.GetKg().value()); + EXPECT_EQ(kExpectedData.GetKv().value(), unpacked_data.GetKv().value()); + EXPECT_EQ(kExpectedData.GetKa().value(), unpacked_data.GetKa().value()); } diff --git a/wpimath/src/test/native/cpp/controller/struct/ArmFeedforwardStructTest.cpp b/wpimath/src/test/native/cpp/controller/struct/ArmFeedforwardStructTest.cpp index a76f52585a..ee1c8d2435 100644 --- a/wpimath/src/test/native/cpp/controller/struct/ArmFeedforwardStructTest.cpp +++ b/wpimath/src/test/native/cpp/controller/struct/ArmFeedforwardStructTest.cpp @@ -26,8 +26,8 @@ TEST(ArmFeedforwardStructTest, Roundtrip) { ArmFeedforward unpacked_data = StructType::Unpack(buffer); - EXPECT_EQ(kExpectedData.kS.value(), unpacked_data.kS.value()); - EXPECT_EQ(kExpectedData.kG.value(), unpacked_data.kG.value()); - EXPECT_EQ(kExpectedData.kV.value(), unpacked_data.kV.value()); - EXPECT_EQ(kExpectedData.kA.value(), unpacked_data.kA.value()); + EXPECT_EQ(kExpectedData.GetKs().value(), unpacked_data.GetKs().value()); + EXPECT_EQ(kExpectedData.GetKg().value(), unpacked_data.GetKg().value()); + EXPECT_EQ(kExpectedData.GetKv().value(), unpacked_data.GetKv().value()); + EXPECT_EQ(kExpectedData.GetKa().value(), unpacked_data.GetKa().value()); } diff --git a/wpimath/src/test/native/cpp/controller/struct/ElevatorFeedforwardStructTest.cpp b/wpimath/src/test/native/cpp/controller/struct/ElevatorFeedforwardStructTest.cpp index 2e5c43a231..e554891ba2 100644 --- a/wpimath/src/test/native/cpp/controller/struct/ElevatorFeedforwardStructTest.cpp +++ b/wpimath/src/test/native/cpp/controller/struct/ElevatorFeedforwardStructTest.cpp @@ -27,8 +27,8 @@ TEST(ElevatorFeedforwardStructTest, Roundtrip) { ElevatorFeedforward unpacked_data = StructType::Unpack(buffer); - EXPECT_EQ(kExpectedData.kS.value(), unpacked_data.kS.value()); - EXPECT_EQ(kExpectedData.kG.value(), unpacked_data.kG.value()); - EXPECT_EQ(kExpectedData.kV.value(), unpacked_data.kV.value()); - EXPECT_EQ(kExpectedData.kA.value(), unpacked_data.kA.value()); + EXPECT_EQ(kExpectedData.GetKs().value(), unpacked_data.GetKs().value()); + EXPECT_EQ(kExpectedData.GetKg().value(), unpacked_data.GetKg().value()); + EXPECT_EQ(kExpectedData.GetKv().value(), unpacked_data.GetKv().value()); + EXPECT_EQ(kExpectedData.GetKa().value(), unpacked_data.GetKa().value()); }