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.
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