Class GyroBase

    • Constructor Detail

      • GyroBase

        public GyroBase()
    • Method Detail

      • setPIDSourceType

        public void setPIDSourceType​(PIDSourceType pidSource)
        Set which parameter of the gyro you are using as a process control variable. The Gyro class supports the rate and displacement parameters
        Specified by:
        setPIDSourceType in interface PIDSource
        Parameters:
        pidSource - An enum to select the parameter.
      • getPIDSourceType

        public PIDSourceType getPIDSourceType()
        Description copied from interface: PIDSource
        Get which parameter of the device you are using as a process control variable.
        Specified by:
        getPIDSourceType in interface PIDSource
        Returns:
        the currently selected PID source parameter
      • pidGet

        public double pidGet()
        Get the output of the gyro for use with PIDControllers. May be the angle or rate depending on the set PIDSourceType
        Specified by:
        pidGet in interface PIDSource
        Returns:
        the output according to the gyro