Go to Post I would be happy playing matches in a waffle house parking lot - mesamb1 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 24-03-2016, 21:54
Jeringo Jeringo is offline
Registered User
FRC #4749
 
Join Date: Jan 2016
Location: Atlanta
Posts: 10
Jeringo is an unknown quantity at this point
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   Spotlight this post!  
Unread 24-03-2016, 22:14
Jeringo Jeringo is offline
Registered User
FRC #4749
 
Join Date: Jan 2016
Location: Atlanta
Posts: 10
Jeringo is an unknown quantity at this point
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);
should i use this instead?

Code:
public NetworkTable table = NetworkTable.getTable("Grip/TowerTarget");
Width = table.getNumberArray("width", 0.0);
SmartDashboard.putNumber("width :", width[0]);
  #3   Spotlight this post!  
Unread 25-03-2016, 10:16
Xanawatt Xanawatt is offline
Registered User
FRC #1024
 
Join Date: May 2015
Location: Indianapolis, Indiana
Posts: 22
Xanawatt is an unknown quantity at this point
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.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:06.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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