mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
SCRIPT: wpiformat
This commit is contained in:
committed by
Peter Johnson
parent
ae6bdc9d25
commit
2109161534
@@ -13,7 +13,8 @@ using StructType = wpi::util::Struct<wpi::math::SwerveModuleState>;
|
||||
|
||||
wpi::math::SwerveModuleState StructType::Unpack(std::span<const uint8_t> data) {
|
||||
return wpi::math::SwerveModuleState{
|
||||
wpi::units::meters_per_second_t{wpi::util::UnpackStruct<double, kSpeedOff>(data)},
|
||||
wpi::units::meters_per_second_t{
|
||||
wpi::util::UnpackStruct<double, kSpeedOff>(data)},
|
||||
wpi::util::UnpackStruct<wpi::math::Rotation2d, kAngleOff>(data),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user