APID

class APID(var pGain: Double, var iGain: Double, var dGain: Double, initial: Double = 0.0, iLimit: Double = 1.0) : PID

Constructors

Link copied to clipboard
constructor(pGain: Double, iGain: Double, dGain: Double, initial: Double = 0.0, iLimit: Double = 1.0)

Properties

Link copied to clipboard
open override var d: Double
Link copied to clipboard
Link copied to clipboard
open override var dGain: Double
Link copied to clipboard
Link copied to clipboard
open var f: Double
Link copied to clipboard
Link copied to clipboard
open override var i: Double
Link copied to clipboard
open override var iGain: Double
Link copied to clipboard
Link copied to clipboard
open override var iLimit: Double
Link copied to clipboard
open var maxPower: Double
Link copied to clipboard
open override var p: Double
Link copied to clipboard
open override var pGain: Double
Link copied to clipboard
open override var power: Double
Link copied to clipboard
Link copied to clipboard
open override var reiniting: Boolean

Functions

Link copied to clipboard
open override fun reInit()

Clears the Integral and derivative values. This should be used if a PID controller has not been in use for an extend period of time (more than a loop cycle) to avoid extreme integral build up.

Link copied to clipboard
open override fun update(state: Double, goal: Double): Double
open fun update(state: Double, velocity: Double, goal: Double = 0.0): Double

Update PID control loop