diff --git a/wpimath/src/main/native/include/frc/kinematics/struct/SwerveDriveKinematicsStruct.h b/wpimath/src/main/native/include/frc/kinematics/struct/SwerveDriveKinematicsStruct.h index 22b1e25933b..5ea1030cbf9 100644 --- a/wpimath/src/main/native/include/frc/kinematics/struct/SwerveDriveKinematicsStruct.h +++ b/wpimath/src/main/native/include/frc/kinematics/struct/SwerveDriveKinematicsStruct.h @@ -28,9 +28,15 @@ struct wpi::Struct> { std::span data); static void Pack(std::span data, const frc::SwerveDriveKinematics& value); + static void ForEachNested( + std::invocable auto fn) { + wpi::ForEachStructSchema(fn); + } }; static_assert(wpi::StructSerializable>); +static_assert(wpi::HasNestedStruct>); static_assert(wpi::StructSerializable>); +static_assert(wpi::HasNestedStruct>); #include "frc/kinematics/struct/SwerveDriveKinematicsStruct.inc" diff --git a/wpimath/src/main/native/include/frc/system/struct/LinearSystemStruct.h b/wpimath/src/main/native/include/frc/system/struct/LinearSystemStruct.h index 21272c2ba2f..da6bca45504 100644 --- a/wpimath/src/main/native/include/frc/system/struct/LinearSystemStruct.h +++ b/wpimath/src/main/native/include/frc/system/struct/LinearSystemStruct.h @@ -35,9 +35,18 @@ struct wpi::Struct> { std::span data); static void Pack(std::span data, const frc::LinearSystem& value); + static void ForEachNested( + std::invocable auto fn) { + wpi::ForEachStructSchema>(fn); + wpi::ForEachStructSchema>(fn); + wpi::ForEachStructSchema>(fn); + wpi::ForEachStructSchema>(fn); + } }; static_assert(wpi::StructSerializable>); +static_assert(wpi::HasNestedStruct>); static_assert(wpi::StructSerializable>); +static_assert(wpi::HasNestedStruct>); #include "frc/system/struct/LinearSystemStruct.inc"