|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I have no experience with Network Tables. I need to send an 2d array to a LabVIEW dashboard using network tables, and I don't quite know where to start.
Code:
public java.lang.Boolean[] getBooleanArray(java.lang.String key,
java.lang.Boolean[] defaultValue)
If someone used Network Tables to comunicate to a dashboard last year and could post that code, I think I could gain a further understanding of network tables from that. Thanks. |
|
#2
|
|||
|
|||
|
Re: Need help with Network Tables
For my usage I use:
Code:
public NetworkTable table = NetworkTable.getTable("locationOfItem");
actualVariable = table.getNumberArray("arrayItem", defaultValue);
SmartDashboard.putNumber("displayName", actualVariable[0]);
|
|
#3
|
||||
|
||||
|
Re: Need help with Network Tables
We just got support for 1D arrays this year, I don't think 2D arrays are currently viable (unless the above poster's solution works for you)
if you ABSOLUTELY need a table, and you can do some data processing on the dashboard (not familiar with configuring the lv dashboard), than you can always send the data as a string encoded with the raw bytes of the 2D array |
|
#4
|
|||
|
|||
|
Re: Need help with Network Tables
Quote:
|
|
#5
|
||||
|
||||
|
Re: Need help with Network Tables
It depends on the scope of your project. If it is a static amount of arrays than yes you could always just use 5 different 1D arrays.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|