Long time lurker, first time posting. Hello everybody!
I’m trying to create a simple slider in ZomB that will let me set the speed of our shooter for testing out the range/rpm ratio on our shooter. I set up a slider in Visual ZomB, named it “Shooter Speed”, and then wrote in my teleopPeriodic() in Java
try {
shooterGoalSpeed = dashboard.getInt("Shooter Speed");
} catch (NetworkTableKeyNotDefined ex) {
ex.printStackTrace();
}
Trouble is, I keep getting the NetworkTableKeyNotDefined exception
[cRIO]edu.wpi.first.wpilibj.networktables.NetworkTableKeyNotDefined
[cRIO] at edu.wpi.first.wpilibj.networktables.NetworkTable.getInt(NetworkTable.java:522)
[cRIO] at edu.wpi.first.wpilibj.smartdashboard.SmartDashboard.getInt(SmartDashboard.java:140)
[cRIO] at edu.wpi.first.wpilibj.templates.RobotTemplate.teleopPeriodic(RobotTemplate.java:147)
[cRIO] at edu.wpi.first.wpilibj.IterativeRobot.startCompetition(IterativeRobot.java:145)
[cRIO] at edu.wpi.first.wpilibj.RobotBase.startApp(RobotBase.java:156)
[cRIO] in virtual method #10 of javax.microedition.midlet.MIDlet(bci=17)
[cRIO] at javax.microedition.midlet.MIDletTunnelImpl.callStartApp(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)
I’ve tried all the different data types, and all sorts of different component names (without spaces, with numbers, etc), but nothing helps. I’m sure this is something stupid I overlooked, but I’ve been at it four hours and I’m not making any headway. Any ideas?
My ZomB Dashboard is working great otherwise, I have encoders mapped to graphs and the camera is showing up. It’s an awesome program. If you haven’t tried it out, I would highly recommend it.