10 #include "frc/DigitalOutput.h"
11 #include "frc/ErrorBase.h"
12 #include "frc/MotorSafety.h"
14 #include "frc/SpeedController.h"
15 #include "frc/smartdashboard/Sendable.h"
16 #include "frc/smartdashboard/SendableHelper.h"
20 class SendableBuilder;
54 void Set(
double speed)
override;
61 double Get()
const override;
85 void PIDWrite(
double output)
override;
88 void StopMotor()
override;
102 bool m_isInverted =
false;
103 bool m_disabled =
false;
106 double m_speed = 0.0;
Class implements the PWM generation in the FPGA.
Definition: PWM.h:40
void InitSendable(SendableBuilder &builder) override
Initializes this Sendable object.
Class to write to digital outputs.
Definition: DigitalOutput.h:27
This base class runs a watchdog timer and calls the subclass's StopMotor() function if the timeout ex...
Definition: MotorSafety.h:24
void Enable()
Re-enable the motor after Disable() has been called.
void SetInverted(bool isInverted) override
Common interface for inverting direction of a speed controller.
int GetChannel() const
Gets the channel number associated with the object.
void PIDWrite(double output) override
Write out the PID value as seen in the PIDOutput base object.
bool GetInverted() const override
Common interface for returning the inversion state of a speed controller.
Nidec Brushless Motor.
Definition: NidecBrushless.h:25
double Get() const override
Get the recently set value of the PWM.
Interface for Sendable objects.
Definition: Sendable.h:17
void Set(double speed) override
Set the PWM value.
A class that enforces constraints on the differential drive kinematics.
Definition: SPIAccelerometerSim.h:16
Interface for speed controlling devices.
Definition: SpeedController.h:19
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:47
NidecBrushless(int pwmChannel, int dioChannel)
Constructor.
A helper class for use with objects that add themselves to SendableRegistry.
Definition: SendableHelper.h:28
Definition: SendableBuilder.h:23
void Disable() override
Disable the motor.