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
@@ -7,12 +7,12 @@
|
||||
#include "wpi/util/protobuf/ProtobufCallbacks.hpp"
|
||||
#include "wpimath/protobuf/kinematics.npb.h"
|
||||
|
||||
std::optional<frc::MecanumDriveKinematics>
|
||||
wpi::Protobuf<frc::MecanumDriveKinematics>::Unpack(InputStream& stream) {
|
||||
wpi::UnpackCallback<frc::Translation2d> frontLeft;
|
||||
wpi::UnpackCallback<frc::Translation2d> frontRight;
|
||||
wpi::UnpackCallback<frc::Translation2d> rearLeft;
|
||||
wpi::UnpackCallback<frc::Translation2d> rearRight;
|
||||
std::optional<wpi::math::MecanumDriveKinematics>
|
||||
wpi::util::Protobuf<wpi::math::MecanumDriveKinematics>::Unpack(InputStream& stream) {
|
||||
wpi::util::UnpackCallback<wpi::math::Translation2d> frontLeft;
|
||||
wpi::util::UnpackCallback<wpi::math::Translation2d> frontRight;
|
||||
wpi::util::UnpackCallback<wpi::math::Translation2d> rearLeft;
|
||||
wpi::util::UnpackCallback<wpi::math::Translation2d> rearRight;
|
||||
wpi_proto_ProtobufMecanumDriveKinematics msg{
|
||||
.front_left = frontLeft.Callback(),
|
||||
.front_right = frontRight.Callback(),
|
||||
@@ -33,7 +33,7 @@ wpi::Protobuf<frc::MecanumDriveKinematics>::Unpack(InputStream& stream) {
|
||||
return {};
|
||||
}
|
||||
|
||||
return frc::MecanumDriveKinematics{
|
||||
return wpi::math::MecanumDriveKinematics{
|
||||
ifrontLeft[0],
|
||||
ifrontRight[0],
|
||||
irearLeft[0],
|
||||
@@ -41,12 +41,12 @@ wpi::Protobuf<frc::MecanumDriveKinematics>::Unpack(InputStream& stream) {
|
||||
};
|
||||
}
|
||||
|
||||
bool wpi::Protobuf<frc::MecanumDriveKinematics>::Pack(
|
||||
OutputStream& stream, const frc::MecanumDriveKinematics& value) {
|
||||
wpi::PackCallback frontLeft{&value.GetFrontLeft()};
|
||||
wpi::PackCallback frontRight{&value.GetFrontRight()};
|
||||
wpi::PackCallback rearLeft{&value.GetRearLeft()};
|
||||
wpi::PackCallback rearRight{&value.GetRearRight()};
|
||||
bool wpi::util::Protobuf<wpi::math::MecanumDriveKinematics>::Pack(
|
||||
OutputStream& stream, const wpi::math::MecanumDriveKinematics& value) {
|
||||
wpi::util::PackCallback frontLeft{&value.GetFrontLeft()};
|
||||
wpi::util::PackCallback frontRight{&value.GetFrontRight()};
|
||||
wpi::util::PackCallback rearLeft{&value.GetRearLeft()};
|
||||
wpi::util::PackCallback rearRight{&value.GetRearRight()};
|
||||
wpi_proto_ProtobufMecanumDriveKinematics msg{
|
||||
.front_left = frontLeft.Callback(),
|
||||
.front_right = frontRight.Callback(),
|
||||
|
||||
Reference in New Issue
Block a user