# # Copyright (c) FIRST and other WPILib contributors. # Open Source Software; you can modify and/or share it under the terms of # the WPILib BSD license file in the root directory of this project. # # # The constants module is a convenience place for teams to hold robot-wide # numerical or boolean constants. Don't use this for any other purpose! # import math import wpilib # Motors kLeftMotor1Port = 0 kLeftMotor2Port = 1 kRightMotor1Port = 2 kRightMotor2Port = 3 # Encoders kLeftEncoderPorts = (0, 1) kRightEncoderPorts = (2, 3) kLeftEncoderReversed = False kRightEncoderReversed = True kEncoderCPR = 1024 kWheelDiameterInches = 6 # Assumes the encoders are directly mounted on the wheel shafts kEncoderDistancePerPulse = (kWheelDiameterInches * math.pi) / kEncoderCPR # Hatch kHatchSolenoidModuleType = wpilib.PneumaticsModuleType.CTREPCM kHatchSolenoidModule = 0 kHatchSolenoidPorts = (0, 1) # Autonomous kAutoDriveDistanceInches = 60 kAutoBackupDistanceInches = 20 kAutoDriveVelocity = 0.5 # Operator Interface kDriverControllerPort = 0 # Physical parameters kDriveTrainMotorCount = 2 kTrackWidth = 0.381 * 2 kGearingRatio = 8 kWheelRadius = 0.0508 # kEncoderResolution = -