|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Can't get data from Network tables
I have recently set up grip on my DS PC and have it post to network tables on roboRIO-4749-FRC.local. I can use outlineviewer.JAR to see the network tables but can't use java to display on the smartdashboard. Could someone give an example from what they have done to get network table values?
|
|
#2
|
|||
|
|||
|
Re: Can't get data from Network tables
right now i have this
Code:
public NetworkTable table = NetworkTable.getTable("Grip/TowerTarget");
Width = table.getNumber("width", 0.0);
SmartDashboard.putNumber("width :", width);
Code:
public NetworkTable table = NetworkTable.getTable("Grip/TowerTarget");
Width = table.getNumberArray("width", 0.0);
SmartDashboard.putNumber("width :", width[0]);
|
|
#3
|
|||
|
|||
|
Re: Can't get data from Network tables
You will need to use the second option. You need to put all of the networktables code in teleopperiodic or you will only get one value at the beginning of the code.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|