Class ControllerGroup

java.lang.Object
com.stuypulse.stuylib.control.Controller
com.stuypulse.stuylib.control.ControllerGroup

public class ControllerGroup extends Controller
Controllers can be grouped together in a "controller group" if they have the same setpoint and measurement.

This allows different controller implementations that are controlling the same variable to be concisely composed together.

  • Constructor Details

    • ControllerGroup

      public ControllerGroup(Controller controller, Controller... controllers)
      Create a controller group
  • Method Details

    • calculate

      protected double calculate(double setpoint, double measurement)
      Updates the internal controllers with the setpoint and measurement and returns their combined output.
      Specified by:
      calculate in class Controller
      Parameters:
      setpoint - setpoint
      measurement - measurement
      Returns:
      summed output of the interal controllers