WPILibC++ 2025.2.1
|
Nidec Brushless Motor. More...
#include <frc/motorcontrol/NidecBrushless.h>
Public Member Functions | |
NidecBrushless (int pwmChannel, int dioChannel) | |
Constructor. | |
~NidecBrushless () override=default | |
NidecBrushless (NidecBrushless &&)=default | |
NidecBrushless & | operator= (NidecBrushless &&)=default |
void | Set (double speed) override |
Set the PWM value. | |
double | Get () const override |
Get the recently set value of the PWM. | |
void | SetInverted (bool isInverted) override |
Common interface for inverting direction of a motor controller. | |
bool | GetInverted () const override |
Common interface for returning the inversion state of a motor controller. | |
void | Disable () override |
Disable the motor. | |
void | Enable () |
Re-enable the motor after Disable() has been called. | |
void | StopMotor () override |
Common interface to stop the motor until Set is called again. | |
std::string | GetDescription () const override |
Returns a description to print when an error occurs. | |
int | GetChannel () const |
Gets the channel number associated with the object. | |
void | InitSendable (wpi::SendableBuilder &builder) override |
Initializes this Sendable object. | |
Public Member Functions inherited from frc::MotorController | |
virtual | ~MotorController ()=default |
virtual void | SetVoltage (units::volt_t output) |
Sets the voltage output of the MotorController. | |
Public Member Functions inherited from frc::MotorSafety | |
MotorSafety () | |
virtual | ~MotorSafety () |
MotorSafety (MotorSafety &&rhs) | |
MotorSafety & | operator= (MotorSafety &&rhs) |
void | Feed () |
Feed the motor safety object. | |
void | SetExpiration (units::second_t expirationTime) |
Set the expiration time for the corresponding motor safety object. | |
units::second_t | GetExpiration () const |
Retrieve the timeout value for the corresponding motor safety object. | |
bool | IsAlive () const |
Determine if the motor is still operating or has timed out. | |
void | SetSafetyEnabled (bool enabled) |
Enable/disable motor safety for this device. | |
bool | IsSafetyEnabled () const |
Return the state of the motor safety enabled flag. | |
void | Check () |
Check if this motor has exceeded its timeout. | |
Public Member Functions inherited from wpi::Sendable | |
virtual constexpr | ~Sendable ()=default |
Public Member Functions inherited from wpi::SendableHelper< NidecBrushless > | |
constexpr | SendableHelper (const SendableHelper &rhs)=default |
constexpr | SendableHelper (SendableHelper &&rhs) |
constexpr SendableHelper & | operator= (const SendableHelper &rhs)=default |
constexpr SendableHelper & | operator= (SendableHelper &&rhs) |
Additional Inherited Members | |
Static Public Member Functions inherited from frc::MotorSafety | |
static void | CheckMotors () |
Check the motors to see if any have timed out. | |
Protected Member Functions inherited from wpi::SendableHelper< NidecBrushless > | |
constexpr | SendableHelper ()=default |
constexpr | ~SendableHelper () |
Nidec Brushless Motor.
frc::NidecBrushless::NidecBrushless | ( | int | pwmChannel, |
int | dioChannel ) |
Constructor.
pwmChannel | The PWM channel that the Nidec Brushless controller is attached to. 0-9 are on-board, 10-19 are on the MXP port. |
dioChannel | The DIO channel that the Nidec Brushless controller is attached to. 0-9 are on-board, 10-25 are on the MXP port. |
|
overridedefault |
|
default |
|
overridevirtual |
Disable the motor.
The Enable() function must be called to re-enable the motor.
Implements frc::MotorController.
void frc::NidecBrushless::Enable | ( | ) |
|
overridevirtual |
Get the recently set value of the PWM.
Implements frc::MotorController.
int frc::NidecBrushless::GetChannel | ( | ) | const |
Gets the channel number associated with the object.
|
overridevirtual |
Returns a description to print when an error occurs.
Implements frc::MotorSafety.
|
overridevirtual |
Common interface for returning the inversion state of a motor controller.
Implements frc::MotorController.
|
overridevirtual |
|
default |
|
overridevirtual |
Set the PWM value.
The PWM value is set using a range of -1.0 to 1.0, appropriately scaling the value for the FPGA.
speed | The speed value between -1.0 and 1.0 to set. |
Implements frc::MotorController.
|
overridevirtual |
Common interface for inverting direction of a motor controller.
isInverted | The state of inversion, true is inverted. |
Implements frc::MotorController.
|
overridevirtual |
Common interface to stop the motor until Set is called again.
Implements frc::MotorController.