50 void Set(
double value)
override;
73 double Get()
const override;
109 template <std::derived_from<PWMMotorController> T>
111 m_owningFollowers.emplace_back(
112 std::make_unique<std::decay_t<T>>(std::forward<T>(follower)));
131 bool m_isInverted =
false;
132 std::vector<PWMMotorController*> m_nonowningFollowers;
133 std::vector<std::unique_ptr<PWMMotorController>> m_owningFollowers;
Class for configuring Direct Memory Access (DMA) of FPGA inputs.
Definition: DMA.h:23
Interface for motor controlling devices.
Definition: MotorController.h:14
The Motor Safety feature acts as a watchdog timer for an individual motor.
Definition: MotorSafety.h:25
Class implements the PWM generation in the FPGA.
Definition: PWM.h:26
Common base class for all PWM Motor Controllers.
Definition: PWMMotorController.h:35
void Disable() override
Common interface for disabling a motor.
void AddFollower(T &&follower)
Make the given PWM motor controller follow the output of this one.
Definition: PWMMotorController.h:110
void InitSendable(wpi::SendableBuilder &builder) override
Initializes this Sendable object.
PWMMotorController(std::string_view name, int channel)
Constructor for a PWM Motor Controller connected via PWM.
bool GetInverted() const override
Common interface for returning the inversion state of a motor controller.
PWMMotorController & operator=(PWMMotorController &&)=default
void StopMotor() override
Called to stop the motor when the timeout expires.
PWM m_pwm
PWM instances for motor controller.
Definition: PWMMotorController.h:128
void SetVoltage(units::volt_t output) override
Sets the voltage output of the PWMMotorController.
void Set(double value) override
Set the PWM value.
double Get() const override
Get the recently set value of the PWM.
PWMMotorController(PWMMotorController &&)=default
std::string GetDescription() const override
Returns a description to print when an error occurs.
void AddFollower(PWMMotorController &follower)
Make the given PWM motor controller follow the output of this one.
void EnableDeadbandElimination(bool eliminateDeadband)
Optionally eliminate the deadband from a motor controller.
void SetInverted(bool isInverted) override
Common interface for inverting direction of a motor controller.
Helper class for building Sendable dashboard representations.
Definition: SendableBuilder.h:21
A helper class for use with objects that add themselves to SendableRegistry.
Definition: SendableHelper.h:19
Interface for Sendable objects.
Definition: Sendable.h:16
basic_string_view< char > string_view
Definition: core.h:501
#define WPI_IGNORE_DEPRECATED
Definition: deprecated.h:20
#define WPI_UNIGNORE_DEPRECATED
Definition: deprecated.h:31
Definition: AprilTagPoseEstimator.h:15
constexpr const char * name(const T &)