12 #include "frc/DigitalOutput.h"
13 #include "frc/ErrorBase.h"
14 #include "frc/MotorSafety.h"
15 #include "frc/MotorSafetyHelper.h"
17 #include "frc/SpeedController.h"
18 #include "frc/smartdashboard/SendableBase.h"
51 void Set(
double speed)
override;
58 double Get()
const override;
91 void PIDWrite(
double output)
override;
116 void SetSafetyEnabled(
bool enabled)
override;
118 bool IsSafetyEnabled()
const override;
134 bool m_isInverted =
false;
135 std::atomic_bool m_disabled{
false};
138 double m_speed = 0.0;
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:45
int GetChannel() const
Gets the channel number associated with the object.
Interface for speed controlling devices.
Definition: SpeedController.h:17
WPILib FRC namespace.
Definition: SPIAccelerometerSim.h:18
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.
void Disable() override
Disable the motor.
void PIDWrite(double output) override
Write out the PID value as seen in the PIDOutput base object.
void SetExpiration(double timeout) override
Set the safety expiration time.
Definition: MotorSafety.h:16
bool GetInverted() const override
Common interface for returning the inversion state of a speed controller.
double GetExpiration() const override
Return the safety expiration time.
Definition: MotorSafetyHelper.h:18
void StopMotor() override
Stop the motor.
double Get() const override
Get the recently set value of the PWM.
void Set(double speed) override
Set the PWM value.
Nidec Brushless Motor.
Definition: NidecBrushless.h:25
Base class for most objects.
Definition: ErrorBase.h:74
Definition: SendableBase.h:19
Class to write to digital outputs.
Definition: DigitalOutput.h:24
Definition: SendableBuilder.h:23
bool IsAlive() const override
Check if the motor is currently alive or stopped due to a timeout.
Class implements the PWM generation in the FPGA.
Definition: PWM.h:36
NidecBrushless(int pwmChannel, int dioChannel)
Constructor.
void InitSendable(SendableBuilder &builder) override
Initializes this Sendable object.