![]() |
Output not updated often enough error
Yesterday, or maybe the day before, all our code stopped working. We had a robot that was fully drivable with the joysticks. However, now any code we run starts throwing exceptions, no matter how simple.
For example, when we attempt to run code as simple as this: Code:
package edu.wpi.first.wpilibj.templates;Code:
java.lang.NullPointerExceptionWe are testing this code without any motors attached to the jaguars since our team is working on the frame. Could this be an issue? Also, one of our other programmers was trying his hand at programming on this. I am not 100% sure what he did, but this problem is persisting throughout all new projects we create. Do these errors indicate that he may have mistakenly modified the API's we received from first? |
Re: Output not updated often enough error
the "Output not updated often enough error" message is a secondary problem. That message will print when your robot apps stops working for any reason.
The Key is in the stack trace: java.lang.NullPointerException [cRIO] at edu.wpi.first.wpilibj.templates.RobotTemplate.tele opPeriodic(RobotTemplate.java:43) So at line 43 of RobotTemplate.java the app tried to do something with a pointer that was null. Like call a method or reference a field. In your code the suspect pointer is "robot". Which you'd think was initialized in robotInit(), but that is actually a local variable that is hiding the field "robot". So the field is still null. The NetBeans editor may have given you a yellow warning on that line. It can sometimes nag too much, but you should always look at the warning by hovering the mouse over the yellow triangle. |
Re: Output not updated often enough error
Just a heads up..
When you put this before your init: P.S you can declare 2 things in one line just use commas, Code:
Joystick left;Code:
Joystick left = new Joystick(1);You dident declare an axis for driving Code:
robot.tankDrive(left.getY(),right.getY()); |
Re: Output not updated often enough error
In your robotInit instead of:
Code:
Joystick left = new Joystick(1);Code:
left = new Joystick(1); |
| All times are GMT -5. The time now is 10:41. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi