Class TurretSubsystemInterface

Inheritance Relationships

Base Type

Class Documentation

class TurretSubsystemInterface : public tap::control::Subsystem

Interface for a generic turret motor with a pitch and yaw motor.

Public Functions

inline explicit TurretSubsystemInterface(Drivers *drivers)
inline virtual float getYawSetpoint() const = 0
Returns:

the desired yaw value value of whatever is being controlled.

inline virtual float getPitchSetpoint() const = 0

See also

getYawSetpoint

virtual void setYawSetpoint(float newAngle) = 0

Sets the desired yaw position of the turret.

Parameters:

newValue[in] the new desired value the turret will try and reach

virtual void setPitchSetpoint(float newAngle) = 0

See also

setPitchSetpoint

virtual const tap::algorithms::WrappedFloat &getCurrentYawValue() const = 0
Returns:

The current value of the turret’s physical yaw.

virtual const tap::algorithms::WrappedFloat &getCurrentPitchValue() const = 0
Returns:

The current physical pitch of the turret.

inline virtual bool isOnline() const = 0
Returns:

true if the turret is online (i.e.: is connected)

inline virtual float getYawVelocity() const = 0
Returns:

the velocity of the turret’s physical yaw motor(s)

inline virtual float getPitchVelocity() const = 0

See also

getYawVelocity

virtual float getYawAngleFromCenter() const = 0

virtual float getPitchAngleFromCenter() const = 0
Returns:

An angle between [-180, 180] that is the angle difference of the pitch’s current value and the center value as defined by a subclass.

virtual void setYawMotorOutput(float out) = 0

Sets yaw motor output. Limits the output based on the mechanical constraints of the turret.

virtual void setPitchMotorOutput(float out) = 0

virtual bool yawLimited() const = 0

If false, the turret may spin 360 degrees freely, otherwise true.