// Copyright (c) FIRST and other WPILib contributors. // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. #include "wpi/math/kinematics/struct/DifferentialDriveWheelSpeedsStruct.hpp" namespace { constexpr size_t kLeftOff = 0; constexpr size_t kRightOff = kLeftOff + 8; } // namespace using StructType = wpi::Struct; frc::DifferentialDriveWheelSpeeds StructType::Unpack( std::span data) { return frc::DifferentialDriveWheelSpeeds{ units::meters_per_second_t{wpi::UnpackStruct(data)}, units::meters_per_second_t{wpi::UnpackStruct(data)}, }; } void StructType::Pack(std::span data, const frc::DifferentialDriveWheelSpeeds& value) { wpi::PackStruct(data, value.left.value()); wpi::PackStruct(data, value.right.value()); }