Go to Post Don’t let the medals you win and the trophies on your mantel define who you are. Let it be the lives you’ve touched and the legacy you leave behind. - Sean Schuff [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 23-03-2016, 19:47
sandiskthefrog sandiskthefrog is offline
Registered User
FRC #0503
 
Join Date: Mar 2016
Location: Michigan
Posts: 4
sandiskthefrog is an unknown quantity at this point
How to add custom widget to smart dashboard?

Hi!

I'm working on a widget that'll change the background of SmartDashboard to green when we ought to shoot and make it red when we shouldn't shoot. The should/shouldn't shoot shoot is handled in our code, but I don't know what to do about the widget.

I downloaded the code found in this thread this thread. And I've uncommented the code to set the color correctly. Thing is, now I don't know how to get that widget onto smartdashboard and activate it when I need to. Help?

If anyone has a better way of accomplishing what I've described with the background color, please feel free to chime in. Thanks.
Reply With Quote
  #2   Spotlight this post!  
Unread 24-03-2016, 10:32
yonip yonip is offline
Registered User
FRC #0449 (The Blair Robot Project)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2014
Location: Silver Spring, MD
Posts: 24
yonip is an unknown quantity at this point
Our team would also be interested in adding widgets to the SD (a working gyro in our case)
As per your question: does it have to be the background of the whole SD? you can use SmartDashboard.putBoolean to put the "canShoot" boolean on, and change the indicator to a booleanbox (false becomes red, true is green) and then resize the box as you see fit. you could resize it to the whole screen and just send the widget back (provided you are fine with those colors as your background).
Reply With Quote
  #3   Spotlight this post!  
Unread 24-03-2016, 11:28
Ben Wolsieffer Ben Wolsieffer is offline
Dartmouth 2020
AKA: lopsided98
FRC #2084 (Robots by the C)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Manchester, MA (Hanover, NH)
Posts: 516
Ben Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud of
Re: How to add custom widget to smart dashboard?

I agree that the best way is to use a boolean box. It has options to change the colors that are displayed for true and false, if you don't like the defaults.
__________________



2016 North Shore District - Semifinalists and Excellence in Engineering Award
2015 Northeastern University District - Semifinalists and Creativity Award
2014 Granite State District - Semifinalists and Innovation in Control Award
2012 Boston Regional - Finalists
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:31.

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