mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
SCRIPT namespace replacements
This commit is contained in:
committed by
Peter Johnson
parent
ae6c043632
commit
9aca8e0fd6
@@ -8,16 +8,16 @@ namespace {
|
||||
constexpr size_t kTrackwidthOff = 0;
|
||||
} // namespace
|
||||
|
||||
using StructType = wpi::Struct<frc::DifferentialDriveKinematics>;
|
||||
using StructType = wpi::util::Struct<wpi::math::DifferentialDriveKinematics>;
|
||||
|
||||
frc::DifferentialDriveKinematics StructType::Unpack(
|
||||
wpi::math::DifferentialDriveKinematics StructType::Unpack(
|
||||
std::span<const uint8_t> data) {
|
||||
return frc::DifferentialDriveKinematics{
|
||||
units::meter_t{wpi::UnpackStruct<double, kTrackwidthOff>(data)},
|
||||
return wpi::math::DifferentialDriveKinematics{
|
||||
wpi::units::meter_t{wpi::util::UnpackStruct<double, kTrackwidthOff>(data)},
|
||||
};
|
||||
}
|
||||
|
||||
void StructType::Pack(std::span<uint8_t> data,
|
||||
const frc::DifferentialDriveKinematics& value) {
|
||||
wpi::PackStruct<kTrackwidthOff>(data, value.trackwidth.value());
|
||||
const wpi::math::DifferentialDriveKinematics& value) {
|
||||
wpi::util::PackStruct<kTrackwidthOff>(data, value.trackwidth.value());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user