Go to Post Engineering is a career of continuous learning, acquiring new skills, and growth. - KenWittlief [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 02-08-2016, 05:41 PM
AtomicBrawlers's Avatar
AtomicBrawlers AtomicBrawlers is offline
Registered User
FRC #5401
 
Join Date: Feb 2016
Location: Bensalem
Posts: 4
AtomicBrawlers is an unknown quantity at this point
Need some help figuring out the SFX SmartDashboard

I've only been able to send values to the SFX window and make them appear. Getting values from the SmartDashboard and using them in the code is a problem however. For example:

double Throttle = SmartDashboard::GetNumber("Get Throttle", 0.0);

This doesn't give me a bug, but as far as I can tell, the variable is always zero. That is probably because I'm unable to change the default case. Nothing appears on the dashboard when I use that code.

Another issue I'm having is getting the camera feed to appear on the SmartDashboard. I'm 99% sure I have the right URL for it entered. The camera being used is the Microsoft Lifecam HD-3000. It appears on the default or C++ dashboard but not the SFX one.
Reply With Quote
  #2   Spotlight this post!  
Unread 02-09-2016, 12:02 AM
kylelanman's Avatar
kylelanman kylelanman is offline
Programming Mentor
AKA: Kyle
FRC #2481 (Roboteers)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2007
Location: Tremont Il
Posts: 185
kylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to all
Re: Need some help figuring out the SFX SmartDashboard

Quote:
Originally Posted by AtomicBrawlers View Post
I've only been able to send values to the SFX window and make them appear. Getting values from the SmartDashboard and using them in the code is a problem however. For example:

double Throttle = SmartDashboard::GetNumber("Get Throttle", 0.0);

This doesn't give me a bug, but as far as I can tell, the variable is always zero. That is probably because I'm unable to change the default case. Nothing appears on the dashboard when I use that code.
We have found that SmartDashboard::GetNumber only works if you have previously used SmartDashboard:utNumber on the same key. So we just do a SmartDashboard:utNumber in the ctor of all our subsystems for whatever parameters we will need. Then in the periodic methods we can call SmartDashboard::GetNumber and it will work.
__________________
"May the coms be with you"

Is this a "programming error" or a "programmer error"?

Reply With Quote
  #3   Spotlight this post!  
Unread 02-10-2016, 07:16 PM
AtomicBrawlers's Avatar
AtomicBrawlers AtomicBrawlers is offline
Registered User
FRC #5401
 
Join Date: Feb 2016
Location: Bensalem
Posts: 4
AtomicBrawlers is an unknown quantity at this point
Re: Need some help figuring out the SFX SmartDashboard

Thanks a ton! It worked! However, would you happen to know how to get the camera to display on the SFX SmartDashboard? I've tried a bunch of different URLs for it and still no luck.
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:17 AM.

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