// 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/DifferentialDriveWheelPositionsStruct.hpp" namespace { constexpr size_t kLeftOff = 0; constexpr size_t kRightOff = kLeftOff + 8; } // namespace using StructType = wpi::Struct; frc::DifferentialDriveWheelPositions StructType::Unpack( std::span data) { return frc::DifferentialDriveWheelPositions{ units::meter_t{wpi::UnpackStruct(data)}, units::meter_t{wpi::UnpackStruct(data)}, }; } void StructType::Pack(std::span data, const frc::DifferentialDriveWheelPositions& value) { wpi::PackStruct(data, value.left.value()); wpi::PackStruct(data, value.right.value()); }