![]() |
Code not working
I'm having some trouble with my code. Everytime I try to upload it keeps on showing this:
[cRIO] FPGA Hardware GUID: 0xa14c11bde4bb64aef6a86fc52a294cd9 [cRIO] FPGA Software GUID: 0xa14c11bde4bb64aef6a86fc52a294cd9 [cRIO] java.lang.NullPointerException: Null motor provided [cRIO] at edu.wpi.first.wpilibj.RobotDrive.<init>(RobotDrive .java:139) [cRIO] at edu.wpi.first.wpilibj.templates.RobotTemplate.Robo tDriveInit(RobotTemplate.java:67) [cRIO] at edu.wpi.first.wpilibj.templates.RobotTemplate.robo tInit(RobotTemplate.java:41) [cRIO] at edu.wpi.first.wpilibj.IterativeRobot.startCompetit ion(IterativeRobot.java:72) [cRIO] at edu.wpi.first.wpilibj.RobotBase.startApp(RobotBase .java:169) [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. Code: Code:
/*----------------------------------------------------------------------------*/ |
Re: Code not working
A possible problem would be that your RobotDrive is getting a null pointer because it is trying to use motors that are still null. If that is the case, the solution is simple, just move the RobotDriveInit method below the TalonInit method. Let me know if that works.
|
Re: Code not working
Quote:
|
Re: Code not working
It works! Thank you!
|
| All times are GMT -5. The time now is 22:15. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi