Go to Post Just as you and your team will make hard decisions as you struggle to build a robot, FIRST has had to make hard decisions concerning maximizing safety while making the number of rules as small as possible. - Mike Betts [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 03-01-2016, 07:15 PM
yonip yonip is offline
Registered User
FRC #0449 (The Blair Robot Project)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2014
Location: Silver Spring, MD
Posts: 24
yonip is an unknown quantity at this point
Broken Code

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

Last edited by yonip : 03-01-2016 at 07:28 PM.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 07:57 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi