You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code snippet below adds a boolean switch onto shuffleboard. Strangely, line 3 works, but line 4 doesn't.
table.getEntry("Switch").setDefaultBoolean(False) # Must setDefault* to make entry visible on Shuffleboardswitch_subscriber=table.getBooleanTopic("Switch").subscribe(False)
button.Trigger(switch_subscriber.get).onTrue(some_command)
button.NetworkButton(switch_subscriber).onTrue(some_command)
My investigation found that the difference in line 4 is that its implementation uses an isConnected() whose document sounds weird: "Return whether or not the instance is connected to another node." What does it mean by "another node"? I am currently just debugging an XRP running locally; isn't it always connected to the current and only node?
BTW, could a future version of NetworkButton also has line 1 built-in, so that the users won't need to deal with that quirk?
"Node" here means any NetworkTables client. Since the robot code is a server, this checks to see if there's any NetworkTables client connected to the server. Thus, isConnected() should be returning true when Shuffleboard is connected.
Problem description
The code snippet below adds a boolean switch onto shuffleboard. Strangely, line 3 works, but line 4 doesn't.
My investigation found that the difference in line 4 is that its implementation uses an
isConnected()
whose document sounds weird: "Return whether or not the instance is connected to another node." What does it mean by "another node"? I am currently just debugging an XRP running locally; isn't it always connected to the current and only node?BTW, could a future version of NetworkButton also has line 1 built-in, so that the users won't need to deal with that quirk?
Operating System
Linux
Installed Python Packages
Reproducible example code
The text was updated successfully, but these errors were encountered: