RIT VEXU Core API
Loading...
Searching...
No Matches
Feedback Class Referenceabstract

#include <feedback_base.h>

Inheritance diagram for Feedback:
MotionController PID TakeBackHalf

Public Member Functions

virtual void init (double start_pt, double set_pt)=0
 
virtual double update (double val)=0
 
virtual double get ()=0
 
virtual void set_limits (double lower, double upper)=0
 
virtual bool is_on_target ()=0
 

Detailed Description

Interface so that subsystems can easily switch between feedback loops

Author
Ryan McGee
Date
9/25/2022

Member Function Documentation

◆ get()

virtual double Feedback::get ( )
pure virtual
Returns
the last saved result from the feedback controller

Implemented in MotionController, PID, and TakeBackHalf.

◆ init()

virtual void Feedback::init ( double start_pt,
double set_pt )
pure virtual

Initialize the feedback controller for a movement

Parameters
start_ptthe current sensor value
set_ptwhere the sensor value should be
start_velMovement starting velocity
end_velMovement ending velocity

Implemented in MotionController, TakeBackHalf, and PID.

◆ is_on_target()

virtual bool Feedback::is_on_target ( )
pure virtual
Returns
true if the feedback controller has reached it's setpoint

Implemented in MotionController, PID, and TakeBackHalf.

◆ set_limits()

virtual void Feedback::set_limits ( double lower,
double upper )
pure virtual

Clamp the upper and lower limits of the output. If both are 0, no limits should be applied.

Parameters
lowerUpper limit
upperLower limit

Implemented in MotionController, PID, and TakeBackHalf.

◆ update()

virtual double Feedback::update ( double val)
pure virtual

Iterate the feedback loop once with an updated sensor value

Parameters
valvalue from the sensor
Returns
feedback loop result

Implemented in MotionController, PID, and TakeBackHalf.


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