Fang-Robotics-MCB
Fang Robotics Team Codebase
Loading...
Searching...
No Matches
tap::control::setpoint::SetpointSubsystem Class Referenceabstract

#include <setpoint_subsystem.hpp>

Inheritance diagram for tap::control::setpoint::SetpointSubsystem:
Collaboration diagram for tap::control::setpoint::SetpointSubsystem:

Public Member Functions

virtual float getSetpoint () const =0
 
virtual void setSetpoint (float newAngle)=0
 
virtual float getCurrentValue () const =0
 
virtual float getJamSetpointTolerance () const =0
 
virtual bool calibrateHere ()=0
 
virtual bool isJammed ()=0
 
virtual void clearJam ()=0
 
virtual bool isCalibrated ()=0
 
virtual bool isOnline ()=0
 
virtual float getVelocity ()=0
 
- Public Member Functions inherited from tap::control::Subsystem
 Subsystem (Drivers *drivers)
 
virtual ~Subsystem ()
 
virtual void initialize ()
 
void registerAndInitialize ()
 
mockable void setDefaultCommand (Command *defaultCommand)
 
mockable CommandgetDefaultCommand () const
 
virtual void refresh ()
 
virtual void refreshSafeDisconnect ()
 
mockable void setTestCommand (Command *testCommand)
 
mockable CommandgetTestCommand () const
 
virtual const char * getName () const
 
mockable int getGlobalIdentifier () const
 

Additional Inherited Members

- Protected Attributes inherited from tap::control::Subsystem
Driversdrivers
 

Detailed Description

An abstract class (usable as an interface) describing the functionalities of a subsystem which uses a positional controller to rotate something.

Any mention of position in the documentation for this class does not necessarily refer to a physical location in space, rather it refers to a quantity describing whatever is being positionally controlled by the subsystem.

Member Function Documentation

◆ calibrateHere()

virtual bool tap::control::setpoint::SetpointSubsystem::calibrateHere ( )
pure virtual

Attempts to calibrate the subsystem at the current position, such that getCurrentValue will return 0 units at this position.

Returns
true if the subsystem has been successfully calibrated, false otherwise.

◆ clearJam()

virtual void tap::control::setpoint::SetpointSubsystem::clearJam ( )
pure virtual

Call to clear the jam flag of the subsystem, indicating that the jam has been solved.

Todo:
At some point we should move the unjam command logic into the subsystems

◆ getCurrentValue()

virtual float tap::control::setpoint::SetpointSubsystem::getCurrentValue ( ) const
pure virtual
Returns
The current value of the controlled variable.

◆ getJamSetpointTolerance()

virtual float tap::control::setpoint::SetpointSubsystem::getJamSetpointTolerance ( ) const
pure virtual
Returns
the jamming tolerance. This is the maximum distance between the ideal setpoint and current value of the controlled variable at which the subsystem will never consider itself jammed.

◆ getSetpoint()

virtual float tap::control::setpoint::SetpointSubsystem::getSetpoint ( ) const
inlinepure virtual
Returns
the subsystem's setpoint: the desired value of whatever is being controlled.

◆ getVelocity()

virtual float tap::control::setpoint::SetpointSubsystem::getVelocity ( )
inlinepure virtual
Returns
the velocity of the subsystem (i.e.: the rate of change of the controlled variable's value).

◆ isCalibrated()

virtual bool tap::control::setpoint::SetpointSubsystem::isCalibrated ( )
inlinepure virtual
Returns
true if the subsystem has been calibrated

◆ isJammed()

virtual bool tap::control::setpoint::SetpointSubsystem::isJammed ( )
pure virtual
Returns
true if the subsystem unjam timer has expired, signaling that the subsystem has jammed, false otherwise.

◆ isOnline()

virtual bool tap::control::setpoint::SetpointSubsystem::isOnline ( )
inlinepure virtual
Returns
true if the subsystem is online (i.e.: is connected)

◆ setSetpoint()

virtual void tap::control::setpoint::SetpointSubsystem::setSetpoint ( float  newAngle)
inlinepure virtual

Sets the desired position of the subsystem, relative to where it was calibrated.

Parameters
[in]newValuethe new desired value the subsystem will try to reach.

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