Go to Post The more time we spend there, and the more investment we have in the team, the more rewarding it is. - ILAMtitan [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #15   Spotlight this post!  
Unread 06-02-2017, 16:51
Rob Heslin Rob Heslin is offline
Registered User
no team
 
Join Date: Feb 2017
Location: Rochester, NY
Posts: 4
Rob Heslin is on a distinguished road
Re: Set Auto Selector choices on default dashboard from Java robot code?

To answer the OP question, the LabVIEW default dashboard does not use a SendableChooser. Rather it requires an array of strings in SmartDashboard called "Auto List" and the user's choice is a single string "Auto Selector". The difficulty is that SmartDashboard.java has many methods that are static, but putStringArray() isn't one of them. Here is a starting point.
Code:
public class Robot extends IterativeRobot {
  SmartDashboard dash = new SmartDashboard();//needed for non-static methods
  String AutoModeSelected;
  public void robotInit() {
    dash.putStringArray("Auto List",ArrayOfAutonomousStrings);
  }
  public void autonomousInit() {
    String AutoModeSelected = dash.getString("Auto Selector");
  }
}
I will say in 2016 the major problem with SmartDashboard.exe is that it independently resolved the RobotIP using mDNS, when the DriverStation program resolved using DNS. mDNS had a tendency not to work often, or take a long time to resolve. The LabVIEW dashboard for sometime, has actually just been given the RobotIP address through TCP port 1741 with the DriverStation program. The option to chose mDNS or the static 10.XX.YY.2 as a way to resolve RobotIP in the SmartDashboard.exe is gone, or at least I can't find it. So SMartDashboard.exe might be using that TCP port data.
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 22:46.

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