java.lang.Object
org.firstinspires.ftc.teamcode.fy23.units.PIDConsts

public class PIDConsts extends Object
Container for PID tuning constants. They cannot be changed after the object is created. Accepted by TunablePID.
  • Field Details

    • kP

      public final double kP
      proportional
    • kI

      public final double kI
      integral multiplier
    • maxI

      public final double maxI
      maximum integral value
    • kD

      public final double kD
      derivative multiplier
  • Constructor Details

    • PIDConsts

      public PIDConsts(double kP, double kI, double maxI, double kD)
    • PIDConsts

      public PIDConsts(String arg)
      Takes a string previously created by the serialize() method. This is useful for reading PID constants from a file. Made with help from Stack Overflow.
  • Method Details

    • serialize

      public String serialize()
      Puts constants in a string. This is useful for writing them to a file. Made with help from Oracle docs.
    • withkP

      public PIDConsts withkP(double newkP)
    • withkI

      public PIDConsts withkI(double newkI)
    • withmaxI

      public PIDConsts withmaxI(double newmaxI)
    • withkD

      public PIDConsts withkD(double newkD)