|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
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! |
|
#2
|
||||
|
||||
|
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. Last edited by Arhowk : 22-02-2016 at 10:34. |
|
#3
|
||||
|
||||
|
Re: Gyro Error Message
The gyro is on Analog port 3
|
|
#4
|
||||
|
||||
|
Re: Gyro Error Message
Gyros can only be on ports 0 and 1 (those two are the ones the FPGA has accumulators hooked up to) |
|
#5
|
|||
|
|||
|
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. |
|
#6
|
||||
|
||||
|
Re: Gyro Error Message
That was it, guess you learn something new even after a 3 years doing this. Thanks for the help everyone!
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|