Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   No Robot Code on RoboRIO (http://www.chiefdelphi.com/forums/showthread.php?t=154204)

generaldgibson 24-01-2017 20:48

No Robot Code on RoboRIO
 
Last week our test RIO was running fine, we were deploying basic code and getting prototypes working just fine. But now the RIO is saying that there is no robot code on the RIO, even though I downloaded code onto the RIO with no problems. I made sure the RIO has the latest versions of Java and the RIO image (unless there's a new RIO image version I hadn't heard about). I searched the topic and tried the trick where you plug the joystick into slot 5 on the DS, that didn't work either. I'm really stumped about why this isn't working. Any help would be appreciated, thanks!

AustinShalit 24-01-2017 20:50

Re: No Robot Code on RoboRIO
 
It looks like your code is crashing. Does the Driver Station console have any messages in it?

generaldgibson 24-01-2017 20:54

Re: No Robot Code on RoboRIO
 
Yes, I was getting this from the driver station.

ERROR Unhandled exception: java.lang.NullPointerException at
[edu.wpi.first.wpilibj.CameraServer.addCamera(Camer aServer.java:785),
org.usfirst.frc.team3397.robot.Robot.robotInit(Rob ot.java:45),
edu.wpi.first.wpilibj.SampleRobot.startCompetition (SampleRobot.java:117),
edu.wpi.first.wpilibj.RobotBase.main(RobotBase.jav a:247)]

AustinShalit 24-01-2017 20:56

Re: No Robot Code on RoboRIO
 
It looks like you have a NPE. If you send me your code (As a zip please), I can take a look.

generaldgibson 24-01-2017 20:57

Re: No Robot Code on RoboRIO
 
Looking at it again, it seems like a lot of problems are stemming from the CameraServer. I noticed that there were some new classes for using the camera this year, but I couldn't ever find a solid guide on how to implement camera - the stuff I did use was a bit confusing.

generaldgibson 24-01-2017 21:23

Re: No Robot Code on RoboRIO
 
1 Attachment(s)
Code should be attached here

AustinShalit 24-01-2017 21:27

Re: No Robot Code on RoboRIO
 
Try this on line 45:
Code:

cam1 = server.startAutomaticCapture();

generaldgibson 24-01-2017 21:31

Re: No Robot Code on RoboRIO
 
That worked. I had a feeling it was the camera, thanks for the help!


All times are GMT -5. The time now is 15:30.

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