View Single Post
  #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