XRPMotor.
More...
#include <wpi/xrp/XRPMotor.hpp>
|
| | XRPMotor (int deviceNum) |
| | Constructs an XRPMotor.
|
| void | SetDutyCycle (double value) override |
| | Sets the duty cycle of the motor controller.
|
| double | GetDutyCycle () const override |
| | Gets the duty cycle of the motor controller.
|
| void | SetInverted (bool isInverted) override |
| | Sets the inversion state of the motor controller.
|
| bool | GetInverted () const override |
| | Gets the inversion state of the motor controller.
|
| void | Disable () override |
| | Disables the motor controller.
|
| void | StopMotor () override |
| | Called to stop the motor when the timeout expires.
|
| std::string | GetDescription () const override |
| | Returns a description to print when an error occurs.
|
| virtual | ~MotorController ()=default |
| virtual void | SetVoltage (wpi::units::volt_t voltage) |
| | Sets the voltage output of the motor controller.
|
| | MotorSafety () |
| virtual | ~MotorSafety () |
| | MotorSafety (MotorSafety &&rhs) |
| MotorSafety & | operator= (MotorSafety &&rhs) |
| void | Feed () |
| | Feed the motor safety object.
|
| void | SetExpiration (wpi::units::second_t expirationTime) |
| | Set the expiration time for the corresponding motor safety object.
|
| wpi::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()
| wpi::xrp::XRPMotor::XRPMotor |
( |
int | deviceNum | ) |
|
|
explicit |
Constructs an XRPMotor.
- Parameters
-
| deviceNum | the motor channel |
◆ Disable()
| void wpi::xrp::XRPMotor::Disable |
( |
| ) |
|
|
overridevirtual |
◆ GetDescription()
| std::string wpi::xrp::XRPMotor::GetDescription |
( |
| ) |
const |
|
overridevirtual |
Returns a description to print when an error occurs.
- Returns
- Description to print when an error occurs.
Implements wpi::MotorSafety.
◆ GetDutyCycle()
| double wpi::xrp::XRPMotor::GetDutyCycle |
( |
| ) |
const |
|
overridevirtual |
Gets the duty cycle of the motor controller.
- Returns
- The duty cycle between -1 and 1 (sign indicates direction).
Implements wpi::MotorController.
◆ GetInverted()
| bool wpi::xrp::XRPMotor::GetInverted |
( |
| ) |
const |
|
overridevirtual |
Gets the inversion state of the motor controller.
- Returns
- The inversion state.
Implements wpi::MotorController.
◆ SetDutyCycle()
| void wpi::xrp::XRPMotor::SetDutyCycle |
( |
double | dutyCycle | ) |
|
|
overridevirtual |
Sets the duty cycle of the motor controller.
- Parameters
-
| dutyCycle | The duty cycle between -1 and 1 (sign indicates direction). |
Implements wpi::MotorController.
◆ SetInverted()
| void wpi::xrp::XRPMotor::SetInverted |
( |
bool | isInverted | ) |
|
|
overridevirtual |
Sets the inversion state of the motor controller.
- Parameters
-
| isInverted | The inversion state. |
Implements wpi::MotorController.
◆ StopMotor()
| void wpi::xrp::XRPMotor::StopMotor |
( |
| ) |
|
|
overridevirtual |
The documentation for this class was generated from the following file: