Go to Post Don't date anyone on your team unless you are POSITVE that you will be able to handle yourself professionally, not only during your relationship, but even after it ends. - Jaine Perotti [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-11-2016, 04:45 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
Getting commands to work with SFX SmartDashboard

I'm trying to get commands to work with the SFX SmartDashboard. I can't figure it out for the life of me. To be clear, by commands I mean the widget you can add to the dashboard that is literally called a "Command." I want to be able to press the play button and have something happen then press it again and have something stop.

I don't see any way to give a command a path nor do I see a way to change something coming from Incoming into a command. Maybe I'm not going about this the right way? Any and all help is appreciated.

P.S. Does anyone know the difference between Passthrough, Nested, and ForceNested?
Reply With Quote
  #2   Spotlight this post!  
Unread 02-17-2016, 04:54 PM
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Getting commands to work with SFX SmartDashboard

Quote:
Originally Posted by AtomicBrawlers View Post
I'm trying to get commands to work with the SFX SmartDashboard. I can't figure it out for the life of me. To be clear, by commands I mean the widget you can add to the dashboard that is literally called a "Command." I want to be able to press the play button and have something happen then press it again and have something stop.

I don't see any way to give a command a path nor do I see a way to change something coming from Incoming into a command. Maybe I'm not going about this the right way? Any and all help is appreciated.

P.S. Does anyone know the difference between Passthrough, Nested, and ForceNested?
Commands are special types, meant for command-based systems. You can't just convert an arbitrary bool value to one. If you create the following keys for a system named "varname" you can use it arbitrarily:
varname/~TYPE~ = "Command"
varname/name = "Varname System"
varname/running = true/false

On grouping containers, you can set a name. If you set it as passthrough, it will ignore the group's name. If you set it as nested, children with names that start with / will ignore the name, while children that don't start with / will have the group's name prepended to theirs, so a group of "x" with a child of "y" will look at network tables path "/x/y". ForceNested always prepends the path. It exists so large heirarchys are not a huge burden to manage and are reusable.
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #3   Spotlight this post!  
Unread 02-19-2016, 06:49 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: Getting commands to work with SFX SmartDashboard

Quote:
Originally Posted by byteit101 View Post
Commands are special types, meant for command-based systems. You can't just convert an arbitrary bool value to one. If you create the following keys for a system named "varname" you can use it arbitrarily:
varname/~TYPE~ = "Command"
varname/name = "Varname System"
varname/running = true/false

On grouping containers, you can set a name. If you set it as passthrough, it will ignore the group's name. If you set it as nested, children with names that start with / will ignore the name, while children that don't start with / will have the group's name prepended to theirs, so a group of "x" with a child of "y" will look at network tables path "/x/y". ForceNested always prepends the path. It exists so large heirarchys are not a huge burden to manage and are reusable.
Yeah so thanks a ton, seriously. But at the same time, neither I nor anyone on my team understood that. The programming mentor on the team couldn't wrap his head around it either. Our C++ is a little rough and this is our second year of competition (my first year).

Thanks for the effort to try and help, but would it be possible to simplify it at all? It honestly just went right over our heads. We don't use LabView and are strictly a C++ team. Thanks in advance.
Reply With Quote
  #4   Spotlight this post!  
Unread 02-21-2016, 01:01 AM
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Getting commands to work with SFX SmartDashboard

Quote:
Originally Posted by AtomicBrawlers View Post
Yeah so thanks a ton, seriously. But at the same time, neither I nor anyone on my team understood that. The programming mentor on the team couldn't wrap his head around it either. Our C++ is a little rough and this is our second year of competition (my first year).

Thanks for the effort to try and help, but would it be possible to simplify it at all? It honestly just went right over our heads. We don't use LabView and are strictly a C++ team. Thanks in advance.
Reading your first message again, you actually should look at the documentation for command-based robots first, and look at the command-based robot example code when you create a new project. That will probably get you on a better track than what I was suggesting
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
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:20 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