mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Add confirmation to SendableChooser (#1217)
This echos back the "selected" value to the "active" key to enable dashboards to display positive feedback to the user that the value is actually set on the robot side. Also fixes SendableChooser so it can be safely added to multiple tables. Changes to "selected" in any table will result in all "active" values being updated. Now that adding SendableChooser to multiple tables is supported, an ".instance" key enables dashboards to treat the same SendableChooser as a common instance if desired.
This commit is contained in:
@@ -9,4 +9,7 @@
|
||||
|
||||
using namespace frc;
|
||||
|
||||
SendableChooserBase::SendableChooserBase() : SendableBase(false) {}
|
||||
std::atomic_int SendableChooserBase::s_instances{0};
|
||||
|
||||
SendableChooserBase::SendableChooserBase()
|
||||
: SendableBase(false), m_instance{s_instances++} {}
|
||||
|
||||
Reference in New Issue
Block a user