Go to Post Welcome to ChiefDelphi a month before Kick-Off. This is an annual traditional experience for quite a few regulars. - synth3tk [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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 14-02-2014, 15:54
octopirates3502 octopirates3502 is offline
Registered User
FRC #3502
 
Join Date: Jan 2014
Location: Tallahassee, FL
Posts: 5
octopirates3502 is an unknown quantity at this point
Analog Declaration Preventing All Robot Functions

In the process of building the robot for the 2014 game, we decided to use a potentiometer to figure out what angle our shooter was angled at. However, whenever I declare anything that would be plugged into an analog port (searched "analog" on http://robotics.francisparker.org/javadoc/) it renders all functions on the robot useless, and I receive the error "Robots don't quit!" What could be happening?
Reply With Quote
  #2   Spotlight this post!  
Unread 14-02-2014, 15:56
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is online now
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,722
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Analog Declaration Preventing All Robot Functions

Have you tried this class yet?

http://robotics.francisparker.org/ja...ntiometer.html
Reply With Quote
  #3   Spotlight this post!  
Unread 14-02-2014, 16:02
BigJ BigJ is offline
Registered User
AKA: Josh P.
FRC #1675 (Ultimate Protection Squad)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Milwaukee, WI
Posts: 947
BigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond repute
Re: Analog Declaration Preventing All Robot Functions

My initial guess is that an exception is being thrown by the declaration or use of something related to the analog input in code. Look up in the output from the "Robots don't quit" message and see if there is a stack trace or error message explaining what the problem is (and post it here if you can't figure it out ).
Reply With Quote
  #4   Spotlight this post!  
Unread 14-02-2014, 16:55
octopirates3502 octopirates3502 is offline
Registered User
FRC #3502
 
Join Date: Jan 2014
Location: Tallahassee, FL
Posts: 5
octopirates3502 is an unknown quantity at this point
Re: Analog Declaration Preventing All Robot Functions

Quote:
Originally Posted by BigJ View Post
My initial guess is that an exception is being thrown by the declaration or use of something related to the analog input in code. Look up in the output from the "Robots don't quit" message and see if there is a stack trace or error message explaining what the problem is (and post it here if you can't figure it out ).
This is it

[cRIO] [Squawk VM] Version: 2011 FRC, Nov 5 2011, 14:34:13
[cRIO] FPGA Hardware GUID: 0x1394f6dc1feb42ec6910e5767ed1d22c
[cRIO] FPGA Software GUID: 0xa14c11bde4bb64aef6a86fc52a294cd9
[cRIO] edu.wpi.first.wpilibj.networktables2.server.Server ConnectionAdapter@8 entered connection state: GOT_CONNECTION_FROM_CLIENT
[cRIO] edu.wpi.first.wpilibj.networktables2.server.Server ConnectionAdapter@8 entered connection state: CONNECTED_TO_CLIENT
[cRIO] edu.wpi.first.wpilibj.util.AllocationException: Analog channel 8 on module 1 is already allocated
[cRIO] at edu.wpi.first.wpilibj.AnalogChannel.<init>(AnalogC hannel.java:68)
[cRIO] at edu.wpi.first.wpilibj.AnalogChannel.<init>(AnalogC hannel.java:49)
[cRIO] at edu.wpi.first.wpilibj.templates.subsystems.Basket. <clinit>(Basket.java:27)
[cRIO] in virtual method #109 of com.sun.squawk.Klass(bci=49)
[cRIO] in virtual method #106 of com.sun.squawk.Klass(bci=328)
[cRIO] in virtual method #105 of com.sun.squawk.Klass(bci=32)
[cRIO] in static method #25 of com.sun.squawk.VM(bci=4)
[cRIO] at edu.wpi.first.wpilibj.templates.commands.CommandBa se.<clinit>(CommandBase.java:20)
[cRIO] in virtual method #109 of com.sun.squawk.Klass(bci=49)
[cRIO] in virtual method #106 of com.sun.squawk.Klass(bci=328)
[cRIO] in virtual method #106 of com.sun.squawk.Klass(bci=156)
[cRIO] in virtual method #105 of com.sun.squawk.Klass(bci=32)
[cRIO] in static method #25 of com.sun.squawk.VM(bci=4)
[cRIO] at edu.wpi.first.wpilibj.templates.RobotTemplate.robo tInit(RobotTemplate.java:35)
[cRIO] at edu.wpi.first.wpilibj.IterativeRobot.startCompetit ion(IterativeRobot.java:72)
[cRIO] at edu.wpi.first.wpilibj.RobotBase.startApp(RobotBase .java:235)
[cRIO] in virtual method #10 of javax.microedition.midlet.MIDlet(bci=17)
[cRIO] at javax.microedition.midlet.MIDletTunnelImpl.callSta rtApp(64)
[cRIO] at com.sun.squawk.imp.MIDletMainWrapper.main(110)
[cRIO] in virtual method #95 of com.sun.squawk.Klass(bci=25)
[cRIO] at com.sun.squawk.Isolate.run(1506)
[cRIO] at java.lang.Thread.run(231)
[cRIO] in virtual method #47 of com.sun.squawk.VMThread(bci=42)
[cRIO] in static method #3 of com.sun.squawk.VM(bci=6)
[cRIO] java.lang.Error: ExceptionInInitializer: edu.wpi.first.wpilibj.templates.subsystems.Basket: edu.wpi.first.wpilibj.util.AllocationException: Analog channel 8 on module 1 is already allocated
[cRIO] in virtual method #106 of com.sun.squawk.Klass(bci=409)
[cRIO] in virtual method #105 of com.sun.squawk.Klass(bci=32)
[cRIO] in static method #25 of com.sun.squawk.VM(bci=4)
[cRIO] at edu.wpi.first.wpilibj.templates.commands.CommandBa se.<clinit>(CommandBase.java:20)
[cRIO] in virtual method #109 of com.sun.squawk.Klass(bci=49)
[cRIO] in virtual method #106 of com.sun.squawk.Klass(bci=328)
[cRIO] in virtual method #106 of com.sun.squawk.Klass(bci=156)
[cRIO] in virtual method #105 of com.sun.squawk.Klass(bci=32)
[cRIO] in static method #25 of com.sun.squawk.VM(bci=4)
[cRIO] at edu.wpi.first.wpilibj.templates.RobotTemplate.robo tInit(RobotTemplate.java:35)
[cRIO] at edu.wpi.first.wpilibj.IterativeRobot.startCompetit ion(IterativeRobot.java:72)
[cRIO] at edu.wpi.first.wpilibj.RobotBase.startApp(RobotBase .java:235)
[cRIO] in virtual method #10 of javax.microedition.midlet.MIDlet(bci=17)
[cRIO] at javax.microedition.midlet.MIDletTunnelImpl.callSta rtApp(64)
[cRIO] at com.sun.squawk.imp.MIDletMainWrapper.main(110)
[cRIO] in virtual method #95 of com.sun.squawk.Klass(bci=25)
[cRIO] at com.sun.squawk.Isolate.run(1506)
[cRIO] at java.lang.Thread.run(231)
[cRIO] in virtual method #47 of com.sun.squawk.VMThread(bci=42)
[cRIO] in static method #3 of com.sun.squawk.VM(bci=6)
[cRIO] WARNING: Robots don't quit!
[cRIO] ---> The startCompetition() method (or methods called by it) should have handled the exception above.
[cRIO] task 0xca7f88 (worker.0) deleted: errno=0 (0) status=0 (0)
Reply With Quote
  #5   Spotlight this post!  
Unread 14-02-2014, 16:57
octopirates3502 octopirates3502 is offline
Registered User
FRC #3502
 
Join Date: Jan 2014
Location: Tallahassee, FL
Posts: 5
octopirates3502 is an unknown quantity at this point
Re: Analog Declaration Preventing All Robot Functions

Quote:
Originally Posted by notmattlythgoe View Post
yes, we did try that class. In the end, we settled to try the AnalogChannel class. In the code we have:

private static final AnalogChannel pot = new AnalogChannel(8);

but it just doesn't like the declaration
Reply With Quote
  #6   Spotlight this post!  
Unread 14-02-2014, 17:02
dvanvoorst dvanvoorst is offline
Registered User
FRC #2771 (Code Red)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Grand Rapids, MI
Posts: 61
dvanvoorst is an unknown quantity at this point
Re: Analog Declaration Preventing All Robot Functions

In the middle of your diagnostic message, you'll see that it believes analog port 8 is already being used:

Code:
[cRIO] java.lang.Error: ExceptionInInitializer: edu.wpi.first.wpilibj.templates.subsystems.Basket: edu.wpi.first.wpilibj.util.AllocationException: Analog channel 8 on module 1 is already allocated
Try using a different port.
Reply With Quote
  #7   Spotlight this post!  
Unread 14-02-2014, 17:23
octopirates3502 octopirates3502 is offline
Registered User
FRC #3502
 
Join Date: Jan 2014
Location: Tallahassee, FL
Posts: 5
octopirates3502 is an unknown quantity at this point
Re: Analog Declaration Preventing All Robot Functions

Quote:
Originally Posted by dvanvoorst View Post
In the middle of your diagnostic message, you'll see that it believes analog port 8 is already being used:

Code:
[cRIO] java.lang.Error: ExceptionInInitializer: edu.wpi.first.wpilibj.templates.subsystems.Basket: edu.wpi.first.wpilibj.util.AllocationException: Analog channel 8 on module 1 is already allocated
Try using a different port.
It worked, thank you so much!
Reply With Quote
  #8   Spotlight this post!  
Unread 14-02-2014, 18:06
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,572
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Analog Declaration Preventing All Robot Functions

Port 8 is used to read the battery voltage.
Reply With Quote
Reply


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 13:29.

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