WPILibC++ 2025.1.1
Loading...
Searching...
No Matches
frc::RomiMotor Class Reference

RomiMotor. More...

#include <frc/romi/RomiMotor.h>

Inheritance diagram for frc::RomiMotor:
frc::PWMMotorController frc::MotorController frc::MotorSafety wpi::Sendable wpi::SendableHelper< PWMMotorController >

Public Member Functions

 RomiMotor (int channel)
 Constructor for a RomiMotor.
 
 RomiMotor (RomiMotor &&)=default
 
RomiMotoroperator= (RomiMotor &&)=default
 
- Public Member Functions inherited from frc::PWMMotorController
 PWMMotorController (PWMMotorController &&)=default
 
PWMMotorControlleroperator= (PWMMotorController &&)=default
 
void Set (double value) override
 Set the PWM value.
 
void SetVoltage (units::volt_t output) override
 Sets the voltage output of the PWMMotorController.
 
double Get () const override
 Get the recently set value of the PWM.
 
virtual units::volt_t GetVoltage () const
 Gets the voltage output of the motor controller, nominally between -12 V and 12 V.
 
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.
 
int GetChannel () const
 
void EnableDeadbandElimination (bool eliminateDeadband)
 Optionally eliminate the deadband from a motor controller.
 
void AddFollower (PWMMotorController &follower)
 Make the given PWM motor controller follow the output of this one.
 
template<std::derived_from< PWMMotorController > T>
void AddFollower (T &&follower)
 Make the given PWM motor controller follow the output of this one.
 
- Public Member Functions inherited from frc::MotorController
virtual ~MotorController ()=default
 
- Public Member Functions inherited from frc::MotorSafety
 MotorSafety ()
 
virtual ~MotorSafety ()
 
 MotorSafety (MotorSafety &&rhs)
 
MotorSafetyoperator= (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< PWMMotorController >
constexpr SendableHelper (const SendableHelper &rhs)=default
 
constexpr SendableHelper (SendableHelper &&rhs)
 
constexpr SendableHelperoperator= (const SendableHelper &rhs)=default
 
constexpr SendableHelperoperator= (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 frc::PWMMotorController
 PWMMotorController (std::string_view name, int channel)
 Constructor for a PWM Motor Controller connected via PWM.
 
void InitSendable (wpi::SendableBuilder &builder) override
 Initializes this Sendable object.
 
- Protected Member Functions inherited from wpi::SendableHelper< PWMMotorController >
constexpr SendableHelper ()=default
 
constexpr ~SendableHelper ()
 
- Protected Attributes inherited from frc::PWMMotorController
PWM m_pwm
 PWM instances for motor controller.
 

Detailed Description

RomiMotor.

A general use PWM motor controller representing the motors on a Romi robot

Constructor & Destructor Documentation

◆ RomiMotor() [1/2]

frc::RomiMotor::RomiMotor ( int channel)
explicit

Constructor for a RomiMotor.

Parameters
channelThe PWM channel that the RomiMotor is attached to. 0 is left, 1 is right

◆ RomiMotor() [2/2]

frc::RomiMotor::RomiMotor ( RomiMotor && )
default

Member Function Documentation

◆ operator=()

RomiMotor & frc::RomiMotor::operator= ( RomiMotor && )
default

The documentation for this class was generated from the following file: