Go to Post Please share your opinion and post whatever you want, I wouldn’t mind. Because I may be wrong. - Arefin Bari [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 10-02-2015, 21:33
neelus neelus is offline
Registered User
FRC #0649
 
Join Date: Jan 2015
Location: Saratoga
Posts: 3
neelus is an unknown quantity at this point
Problems with SFX and Network Tables

Hi,
My team (649) has been messing around with SmartDashboard 2.0 and Network Tables for a bit now, and we have had no luck displaying to SFX or pulling from NetworkTable Client programs. This is what the client program looks like:

Code:
public class SFXTester implements ITableListener{
	NetworkTable table;
	
	public static void main(String[] args){
		new SFXTester().run();
	}
	
	public void run(){
		
		NetworkTable.setClientMode();
		NetworkTable.setIPAddress("10.6.49.2");
		
		table = NetworkTable.getTable("datatable");
		
		table.addTableListener(this);
		
		JFrame frame = new JFrame();
		JPanel panel = new JPanel();
		JTextField text = new JTextField();
		text.setText("THIS IS A QUALITY SENTENCE");
		
		frame.setSize(450,300);
		panel.setBackground(Color.CYAN);
		panel.add(text);
		
		frame.add(panel);
		
		frame.setTitle(table.getString("Test Input", ""));
		frame.setVisible(true);
		
		while (true){
			text.setText(table.getString("Text Input", "Nothing Found"));
		}
			
	}

	@Override
	public void valueChanged(ITable source, String key, Object value, boolean isNew) {
		System.out.println("Value Changed");
	}
}
And the robot program we are running gets the same "datatable" and pushes to it. When we try and pull, we get absolutely nothing. Can anyone help us with this?? A working example code would be super helpful.

Also, we made SFX pop up with the dashboard and it opens fine. When we call SmartDashboard.putData() with the data we want to display, nothing shows up...Even in test mode, and we are calling LiveWindow.run(), we see nothing on SFX. I haven't actually ever seen anything pop up on SFX...Any help would be appreciated

Thanks so much in advance!
Reply With Quote
 


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 10:52.

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