XRPMotor.
More...
#include <frc/xrp/XRPMotor.h>
|
| | XRPMotor (int deviceNum) |
| | Constructs an XRPMotor.
|
| |
| void | Set (double value) override |
| | Common interface for setting the speed of a motor controller.
|
| |
| double | Get () const override |
| | Common interface for getting the current set speed of a motor controller.
|
| |
| 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 |
| | Common interface for disabling a motor.
|
| |
| 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.
|
| |
| virtual | ~MotorController ()=default |
| |
| virtual void | SetVoltage (units::volt_t output) |
| | Sets the voltage output of the MotorController.
|
| |
| | 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.
|
| |
|
| static void | CheckMotors () |
| | Check the motors to see if any have timed out.
|
| |
XRPMotor.
A SimDevice based motor controller representing the motors on an XRP robot
◆ XRPMotor()
| frc::XRPMotor::XRPMotor |
( |
int | deviceNum | ) |
|
|
explicit |
Constructs an XRPMotor.
- Parameters
-
| deviceNum | the motor channel |
◆ Disable()
| void frc::XRPMotor::Disable |
( |
| ) |
|
|
overridevirtual |
◆ Get()
| double frc::XRPMotor::Get |
( |
| ) |
const |
|
overridevirtual |
Common interface for getting the current set speed of a motor controller.
- Returns
- The current set speed. Value is between -1.0 and 1.0.
Implements frc::MotorController.
◆ GetDescription()
| std::string frc::XRPMotor::GetDescription |
( |
| ) |
const |
|
overridevirtual |
Returns a description to print when an error occurs.
- Returns
- Description to print when an error occurs.
Implements frc::MotorSafety.
◆ GetInverted()
| bool frc::XRPMotor::GetInverted |
( |
| ) |
const |
|
overridevirtual |
Common interface for returning the inversion state of a motor controller.
- Returns
- isInverted The state of inversion, true is inverted.
Implements frc::MotorController.
◆ Set()
| void frc::XRPMotor::Set |
( |
double | speed | ) |
|
|
overridevirtual |
Common interface for setting the speed of a motor controller.
- Parameters
-
| speed | The speed to set. Value should be between -1.0 and 1.0. |
Implements frc::MotorController.
◆ SetInverted()
| void frc::XRPMotor::SetInverted |
( |
bool | isInverted | ) |
|
|
overridevirtual |
Common interface for inverting direction of a motor controller.
- Parameters
-
| isInverted | The state of inversion, true is inverted. |
Implements frc::MotorController.
◆ StopMotor()
| void frc::XRPMotor::StopMotor |
( |
| ) |
|
|
overridevirtual |
The documentation for this class was generated from the following file: