Go to Post Dear GDC, You are awesome. From, the Chief Delphi folks. - bam-bam [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 22-02-2016, 09:55
ShinyShips's Avatar
ShinyShips ShinyShips is offline
Former Operator and Captain
AKA: Andy
FRC #3314 (Mechanical Mustangs)
Team Role: Alumni
 
Join Date: Mar 2014
Rookie Year: 2014
Location: Clifton, NJ
Posts: 22
ShinyShips is on a distinguished road
Gyro Error Message

For some reason our gyro code has stopped working, it worked fined for the last few weeks and now we cannot even initialize a simple Analog Gyro without getting an error message and getting no robot code to the robot.

The error is as follows:

ERROR Unhandled exception: java.lang.RuntimeException: Code: -1005. HAL: A pointer parameter to a method is NULL at [edu.wpi.first.wpilibj.hal.AnalogJNI.setAccumulator Deadband(Native Method), edu.wpi.first.wpilibj.AnalogInput.setAccumulatorDe adband(AnalogInput.java:279), edu.wpi.first.wpilibj.AnalogGyro.setDeadband(Analo gGyro.java:239), edu.wpi.first.wpilibj.AnalogGyro.initGyro(AnalogGy ro.java:56), edu.wpi.first.wpilibj.AnalogGyro.<init>(AnalogGyro .java:106), edu.wpi.first.wpilibj.AnalogGyro.<init>(AnalogGyro .java:90), org.usfirst.frc.team3314.robot.Robot.robotInit(Rob ot.java:82), edu.wpi.first.wpilibj.IterativeRobot.startCompetit ion(IterativeRobot.java:72), edu.wpi.first.wpilibj.RobotBase.main(RobotBase.jav a:241)]

The only thing we are doing with gyro now is creating it below Iterative Robot, and then initializing it in robotInit.

Any help or insight would be appreciated.

Thanks!
Reply With Quote
  #2   Spotlight this post!  
Unread 22-02-2016, 10:08
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 542
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: Gyro Error Message

What port is the gyro on

Code:
The only thing we are doing with gyro now is creating it below Iterative Robot, and then initializing it in robotInit.
Could you post this code
__________________
FRC Team 1684 - Head Programmer (2013-2016)
FRC Team 5460 - Programming Mentor (2015-2016)

FIRST in Michigan - Technical Crew (2015-continuing)

Last edited by Arhowk : 22-02-2016 at 10:34.
Reply With Quote
  #3   Spotlight this post!  
Unread 22-02-2016, 10:22
ShinyShips's Avatar
ShinyShips ShinyShips is offline
Former Operator and Captain
AKA: Andy
FRC #3314 (Mechanical Mustangs)
Team Role: Alumni
 
Join Date: Mar 2014
Rookie Year: 2014
Location: Clifton, NJ
Posts: 22
ShinyShips is on a distinguished road
Re: Gyro Error Message

The gyro is on Analog port 3
Reply With Quote
  #4   Spotlight this post!  
Unread 22-02-2016, 10:34
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 542
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: Gyro Error Message

Quote:
Originally Posted by ShinyShips View Post
The gyro is on Analog port 3

Gyros can only be on ports 0 and 1 (those two are the ones the FPGA has accumulators hooked up to)
__________________
FRC Team 1684 - Head Programmer (2013-2016)
FRC Team 5460 - Programming Mentor (2015-2016)

FIRST in Michigan - Technical Crew (2015-continuing)
Reply With Quote
  #5   Spotlight this post!  
Unread 22-02-2016, 10:36
pblankenbaker pblankenbaker is offline
Registered User
FRC #0868
 
Join Date: Feb 2012
Location: Carmel, IN, USA
Posts: 103
pblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of light
Re: Gyro Error Message

Can you try moving it to port 0 or 1?

I don't think you can connect an AnalogGyro to ports other than 0 or 1 on the roboRIO. See: http://wpilib.screenstepslive.com/s/...ving-direction, it indicates that the FPGA used for integrating the gyro data is only available on ports 0 and 1.
Reply With Quote
  #6   Spotlight this post!  
Unread 22-02-2016, 14:31
ShinyShips's Avatar
ShinyShips ShinyShips is offline
Former Operator and Captain
AKA: Andy
FRC #3314 (Mechanical Mustangs)
Team Role: Alumni
 
Join Date: Mar 2014
Rookie Year: 2014
Location: Clifton, NJ
Posts: 22
ShinyShips is on a distinguished road
Re: Gyro Error Message

That was it, guess you learn something new even after a 3 years doing this. Thanks for the help everyone!
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 22:43.

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