Broken Code

So our program is compiling in Eclipse but is returning an error that I dont understand in the DS. I added a second driveTele command that runs on the second XBox controller which has completely inverted controls. Thats the only questionable code that I can think of.

Here is the error:

241)]ERROR Unhandled exception: java.lang.RuntimeException: Code: -1029. HAL: Resource already allocated at edu.wpi.first.wpilibj.hal.PWMJNI.allocatePWMChannel(Native Method), edu.wpi.first.wpilibj.PWM.initPWM(PWM.java:117), edu.wpi.first.wpilibj.PWM.(PWM.java:134), edu.wpi.first.wpilibj.SafePWM.(SafePWM.java:35), edu.wpi.first.wpilibj.Talon.(Talon.java:51), org.usfirst.frc.team4623.robot.subsystems.Chassis2.(Chassis2.java:23), org.usfirst.frc.team4623.robot.Robot.robotInit(Robot.java:53), edu.wpi.first.wpilibj.IterativeRobot.startCompetition(IterativeRobot.java:72), edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:

Here is the link to the code on GitHub:

I really hope somebody has the answer to this because I have no idea whats going on. Thanks for the help!

the error you are seeing is caused by one port being allocated to two objects. In this case, your problem is that both Chassis and Chassis2 have talons set to ports 1 through 4, and both are initialized in Robot.java, hence the crash originating on line 23 of Chassis2.
Is there any reason you have both Chassis and Chassis2 in your code?
EDIT: nevermind, i see. why do you have two controllers controlling on robot chassis? i’d recommend having a command that simply flips the sign on a constant in Chassis when a certain button is pressed (allowing you to keep to a single contoller).
if you really want two controllers, the only working solution i see is having one command for chassis that looks at the input from both controllers, picks the one that has a bigger value (or something like that) and if it picked the values from the inverted joustick, it negates them when it passes them to the Chassis’s driveTele method.
If you’d like more specific tips and/or code snippets id be at my computer in ~30 mins to supply those