Open
Description
Problem description
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 Shuffleboard
switch_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?
Operating System
Linux
Installed Python Packages
$ pip list
Package Version
------------------------ ----------
bcrypt 4.2.1
cffi 1.17.1
cryptography 44.0.0
flexcache 0.3
flexparser 0.4
iniconfig 2.0.0
packaging 23.2
paramiko 3.5.0
Pint 0.24.4
pip 24.3.1
platformdirs 4.3.6
pluggy 1.5.0
pycparser 2.22
pyfrc 2025.0.0
PyNaCl 1.5.0
pynetconsole 2.0.4
pyntcore 2025.1.1.0
pytest 8.3.4
pytest-reraise 2.1.2
robotpy 2025.1.1.1
robotpy-cli 2024.0.0
robotpy-commands-v2 2025.1.1
robotpy-hal 2025.1.1.0
robotpy-halsim-gui 2025.1.1.0
robotpy-installer 2025.0.0
robotpy-wpilib-utilities 2025.0.0
robotpy-wpimath 2025.1.1.0
robotpy-wpinet 2025.1.1.0
robotpy-wpiutil 2025.1.1.0
robotpy-xrp 2025.1.1.0
tomli 2.2.1
tomlkit 0.13.2
typing_extensions 4.12.2
wpilib 2025.1.1.0
Reproducible example code
Metadata
Metadata
Assignees
Labels
No labels