18template <
class Distance>
19 requires units::length_unit<Distance> || units::angle_unit<Distance>
27 static std::optional<frc::SimpleMotorFeedforward<Distance>>
Unpack(
38 units::volt_t{msg.
ks},
41 units::second_t{msg.
dt},
51 .ks = value.GetKs().value(),
56 .dt = units::second_t{value.GetDt()}.value(),
A helper class that computes feedforward voltages for a simple permanent-magnet DC motor.
Definition SimpleMotorFeedforward.h:24
Container for values which represent quantities of a given unit.
Definition base.h:1930
constexpr underlying_type value() const noexcept
unit value
Definition base.h:2111
Class for wrapping a nanopb ostream.
Definition Protobuf.h:119
bool Encode(const typename Protobuf< std::remove_cvref_t< T > >::MessageStruct &msg)
Decodes a protobuf.
Definition Protobuf.h:211
struct _wpi_proto_ProtobufSimpleMotorFeedforward wpi_proto_ProtobufSimpleMotorFeedforward
typename units::detail::base_unit_of_impl< U >::type base_unit_of
Trait which returns the base_unit type that a unit is originally derived from.
Definition base.h:936
Definition controller.npb.h:53
double kv
Definition controller.npb.h:59
double ks
Definition controller.npb.h:58
double ka
Definition controller.npb.h:60
double dt
Definition controller.npb.h:61
Type representing an arbitrary unit.
Definition base.h:888
static bool Pack(OutputStream &stream, const frc::SimpleMotorFeedforward< Distance > &value)
Definition SimpleMotorFeedforwardProto.h:45
static std::optional< frc::SimpleMotorFeedforward< Distance > > Unpack(InputStream &stream)
Definition SimpleMotorFeedforwardProto.h:27
Protobuf serialization template.
Definition Protobuf.h:36