[wpimath] Struct cleanup (#6011)

This commit is contained in:
Joseph Eng
2023-12-04 22:40:18 -08:00
committed by GitHub
parent 90757b9e90
commit 14c3ade155
32 changed files with 95 additions and 49 deletions

View File

@@ -20,8 +20,8 @@ const DCMotor kExpectedData = DCMotor{units::volt_t{1.91},
} // namespace
TEST(DCMotorStructTest, Roundtrip) {
uint8_t buffer[StructType::kSize];
std::memset(buffer, 0, StructType::kSize);
uint8_t buffer[StructType::GetSize()];
std::memset(buffer, 0, StructType::GetSize());
StructType::Pack(buffer, kExpectedData);
DCMotor unpacked_data = StructType::Unpack(buffer);