Class TBHController

Class Documentation

class TBHController

Class used as a Take-Back Half controller.

Public Functions

explicit TBHController(double _k)

Creates a new TBH controller with the given gain

void setSetpoint(double _setpoint)

Sets the target value of the controller

void setOutputRange(double _minOutput, double _maxOutput)

Sets the range of possible output values

Parameters
  • _minOutput – lower bound for output values

  • _maxOutput – upper bound for output values

void setDeltaTime(Units::Time _deltaTime)

Sets the amount of time between each controller loop

double getOutput()

Returns the computed control input

void update(double measurement)

Update the PID controller with the new measured value