mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
[wpimath] Add remaining struct and protobuf implementations (#5953)
This commit is contained in:
22
wpimath/src/main/native/include/frc/proto/MatrixProto.h
Normal file
22
wpimath/src/main/native/include/frc/proto/MatrixProto.h
Normal file
@@ -0,0 +1,22 @@
|
||||
// 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.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wpi/protobuf/Protobuf.h>
|
||||
|
||||
#include "frc/EigenCore.h"
|
||||
|
||||
template <int Rows, int Cols, int Options, int MaxRows, int MaxCols>
|
||||
requires(Cols != 1)
|
||||
struct wpi::Protobuf<frc::Matrixd<Rows, Cols, Options, MaxRows, MaxCols>> {
|
||||
static google::protobuf::Message* New(google::protobuf::Arena* arena);
|
||||
static frc::Matrixd<Rows, Cols, Options, MaxRows, MaxCols> Unpack(
|
||||
const google::protobuf::Message& msg);
|
||||
static void Pack(
|
||||
google::protobuf::Message* msg,
|
||||
const frc::Matrixd<Rows, Cols, Options, MaxRows, MaxCols>& value);
|
||||
};
|
||||
|
||||
#include "frc/proto/MatrixProto.inc"
|
||||
Reference in New Issue
Block a user