-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.py
executable file
·57 lines (44 loc) · 1.17 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import wpilib
from utils import Button
# Joysticks
leftJoy = wpilib.Joystick(2)
rightJoy = wpilib.Joystick(1)
# Motors & Drive System
leftMotor = wpilib.Jaguar(1)
rightMotor = wpilib.Jaguar(2)
robotDrive = wpilib.RobotDrive(leftMotor, rightMotor)
shooterMotor = wpilib.Jaguar(4)
tipperMotor = wpilib.Jaguar(7)
rollerMotor = wpilib.Victor(10)
# Servos
latchServo = wpilib.Servo(5)
feederServo = wpilib.Servo(8)
# Sensors
shooterEncoder = wpilib.Encoder(1, 2, False)
photo1 = wpilib.DigitalInput(4)
photo2 = wpilib.DigitalInput(5)
photo3 = wpilib.DigitalInput(6)
photo4 = wpilib.DigitalInput(7)
topLimit = wpilib.DigitalInput(9)
bottomLimit = wpilib.DigitalInput(10)
timer = wpilib.Timer()
# Button Mappings
## Right Joystick ##
tipperUp = 6
tipperUpButton = Button(rightJoy, 6)
tipperDown = 7
tipperDownButton = Button(rightJoy, 7)
alignButtonNum = 3
alignButton = Button(rightJoy, 3)
latchButton = 4
feederButton = 5
rollerUpButton = 11
rollerDownButton = 10
## Left Joystick ##
halfSpeed = 1
hsButton = Button(leftJoy, 1)
# Core Functions
def CheckRestart():
return
## if leftJoy.GetRawButton(10):
## raise SystemExit