Go to Post If it reads MINUS voltage, the power is reversed (and this is bad). - DonRotolo [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

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 18-11-2016, 23:32
dash102 dash102 is offline
Registered User
FRC #5968
 
Join Date: Nov 2016
Location: Manhattan, KS
Posts: 3
dash102 is an unknown quantity at this point
Question SmartDashboard Problem

I am new to setting up a custom dashboard - right now, when I use putNumber(), where is the value I set going? I am able to retrieve it using getNumber(), but I can't get the value to display on the dashboard.
Reply With Quote
  #2   Spotlight this post!  
Unread 19-11-2016, 07:38
AustinShalit's Avatar
AustinShalit AustinShalit is offline
Registered User
no team (WPILib Suite Developer)
 
Join Date: Dec 2013
Rookie Year: 2008
Location: Los Angeles/Worcester
Posts: 79
AustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of light
Re: SmartDashboard Problem

Hi there! Please make sure you followed all of the instructions here:

https://wpilib.screenstepslive.com/s...smartdashboard

You may also want to try to add a Connection Indicator (View -> Add... -> Connection Indicator).
__________________
Reply With Quote
  #3   Spotlight this post!  
Unread 19-11-2016, 11:28
euhlmann's Avatar
euhlmann euhlmann is offline
CTO, Programmer
AKA: Erik Uhlmann
FRC #2877 (LigerBots)
Team Role: Leadership
 
Join Date: Dec 2015
Rookie Year: 2015
Location: United States
Posts: 296
euhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud of
Re: SmartDashboard Problem

When you do this in robot code
Code:
SmartDashboard.putNumber("something", 1);
it goes on the SmartDashboard table.
So on a custom dashboard you might do (in Java)
Code:
NetworkTable sd = NetworkTable.getTable("SmartDashboard");

sd.getNumber("something"); // 1
__________________
Creator of SmartDashboard.js, an extensible nodejs/webkit replacement for SmartDashboard


https://ligerbots.org
Reply With Quote
  #4   Spotlight this post!  
Unread 19-11-2016, 20:25
dash102 dash102 is offline
Registered User
FRC #5968
 
Join Date: Nov 2016
Location: Manhattan, KS
Posts: 3
dash102 is an unknown quantity at this point
Re: SmartDashboard Problem

Thanks! So do I have to be connected to the robot to be able to see the dashboard? Am I able to see it disconnected, just with no values in the spaces where values are supposed to be?
Reply With Quote
  #5   Spotlight this post!  
Unread 20-11-2016, 12:44
euhlmann's Avatar
euhlmann euhlmann is offline
CTO, Programmer
AKA: Erik Uhlmann
FRC #2877 (LigerBots)
Team Role: Leadership
 
Join Date: Dec 2015
Rookie Year: 2015
Location: United States
Posts: 296
euhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud of
Re: SmartDashboard Problem

Quote:
Originally Posted by dash102 View Post
Thanks! So do I have to be connected to the robot to be able to see the dashboard? Am I able to see it disconnected, just with no values in the spaces where values are supposed to be?
You have to be connected. If you are not connected, this (deprecated) throws an exception
Code:
NetworkTable.getTable("SmartDashboard").getNumber("something")
and this (the recommended way)
Code:
NetworkTable.getTable("SmartDashboard").getNumber("something", defaultValue)
returns defaultValue
However if you connect and then disconnect, the values returned will be the last known values.
__________________
Creator of SmartDashboard.js, an extensible nodejs/webkit replacement for SmartDashboard


https://ligerbots.org
Reply With Quote
  #6   Spotlight this post!  
Unread 23-11-2016, 02:42
TylerHarmon TylerHarmon is offline
Registered User
FRC #4499
 
Join Date: Jan 2016
Location: Westminster, CO
Posts: 5
TylerHarmon is an unknown quantity at this point
Re: SmartDashboard Problem

Quote:
Originally Posted by dash102 View Post
I am new to setting up a custom dashboard - right now, when I use putNumber(), where is the value I set going? I am able to retrieve it using getNumber(), but I can't get the value to display on the dashboard.
Yep, the values go into SmartDashboard.jar. You don't need to be connected to the robot to run that, you can run it while disconnected, and the values will be blank. You can also enable the edit mode and configure the layout of the dashboard, add dials/bars/graphs, etc. In addition, check out the SmartDashboard SFX, which allows for more visual control.

Last year I used this to display, on a dial and a bar, the amount of pressure that our pneumatic system had left so that our drivers could tell if they had enough pressure to fire or not. It's a great tool that's easy to use

Good luck!
Reply With Quote
  #7   Spotlight this post!  
Unread 25-11-2016, 01:59
dash102 dash102 is offline
Registered User
FRC #5968
 
Join Date: Nov 2016
Location: Manhattan, KS
Posts: 3
dash102 is an unknown quantity at this point
Re: SmartDashboard Problem

Quote:
Originally Posted by TylerHarmon View Post
Yep, the values go into SmartDashboard.jar. You don't need to be connected to the robot to run that, you can run it while disconnected, and the values will be blank. You can also enable the edit mode and configure the layout of the dashboard, add dials/bars/graphs, etc. In addition, check out the SmartDashboard SFX, which allows for more visual control.

Last year I used this to display, on a dial and a bar, the amount of pressure that our pneumatic system had left so that our drivers could tell if they had enough pressure to fire or not. It's a great tool that's easy to use

Good luck!
Thanks for the info. I don't see any blank values at all when I check SmartDashboard.jar - when I try to add preferences, the preferences box doesn't update, and when I try to use a method like putNumber(), nothing new shows up. Do you have any code examples so I can see what I'm doing wrong?
Reply With Quote
Reply


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 09:40.

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