> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dairy.foundation/llms.txt
> Use this file to discover all available pages before exploring further.

# Controllers

Controllers are Dairy's automatic background updating control theory updating
system.

Advantages of controllers over PID classes or similar from other libraries:

* Automatically update in the background of your robot code.
* Can model pretty much any system.
* Easy extensible with your own additions to the control system.
* Not tied to any motor.
* Works with not only with `Double`s but also Dairy Util's `Unit`s, `Vector`s,
  and `Pose`s.

Disadvantages:

* Currently lacking in prefabricated components (We'd love a hand, even if all
  you have is requests)!
* Can increase boilerplate in some places, in return for reducing it in others.
* The system is quite complex, so can be harder to understand if you're newer to
  programming.

As always, we don't mind if you decide that controllers aren't for you, in which
case we recommend writing a `Feature` to automate updates for your PID
controller.

Controllers are best documented by the overviews:

[Java](https://github.com/Dairy-Foundation/Dairy/blob/master/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/examples/controller/JavaOverview.java)

[Kotlin](https://github.com/Dairy-Foundation/Dairy/blob/master/TeamCode/src/main/kotlin/org/firstinspires/ftc/teamcode/examples/controller/KotlinOverview.kt)
