Class RobotHardware


  • public class RobotHardware
    extends java.lang.Object
    Use this class to control all motors and sensors
    • Constructor Detail

      • RobotHardware

        public RobotHardware​(double period)
        Use this class to control all motors and sensors See below for changes
        Parameters:
        period - what to set the motor expireation to
        "Changelog:"

        added 4 drive motors

        added gyro

        changed init function to constructor

    • Method Detail

      • setSafeCalcuater

        public double setSafeCalcuater​(double speed,
                                       double currentSpeed)
        Calculates out what your motor speed should be
        Parameters:
        speed - the target speed
        currentSpeed - the current speed
        Returns:
        then new speed
      • clip

        public double clip​(double value,
                           double min,
                           double max)
        Clips the value to fit inbetween the minimum and maximum values
        Parameters:
        value - the value to clip
        min - the minimum value
        max - the maximum value
        Returns:
        the cliped value