Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Problems with SFX and Network Tables (http://www.chiefdelphi.com/forums/showthread.php?t=134327)

neelus 10-02-2015 21:33

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!

nickmcski 11-02-2015 02:25

Re: Problems with SFX and Network Tables
 
I assumed you checked this but you have your team number punched into the settings correctly? I know a few teams that didn't do that and ran into some problems. Also if your useing a generic network table viewer does it show the data incoming? (I don't know the exact path but I think one came with with the driver station update a few years ago, I can check when I got into robotics tomorrow) also I noteded your connecting to 10.6.49.2, is that the address of your robot this year? If you just use the default consiguration it will have a dynamic IP.

neelus 11-02-2015 21:59

Our team number is correct, but how do we change the configuration of the IP? I am pretty sure it is 10.6.49.2 but we are not getting anything on the table viewer.


All times are GMT -5. The time now is 10:52.

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