SendableChooser: Do not automatically add to LiveWindow. (#964)

SendableChooser::InitSendable() is written such that it saves the table
being used in an instance variable.  This doesn't work if the chooser is
added to both LiveWindow and SmartDashboard.  Normally it is not added to
LiveWindow because the name is empty, but if setName() is called this could
still happen.  Note adding the same SendableChooser to SmartDashboard with
two different names is also not currently supported, for the same reason.

The correct solution will be to remove the instance variable, but this is
too high risk to implement mid-season, so instead just remove from LiveWindow.
This commit is contained in:
Peter Johnson
2018-03-03 21:34:42 -08:00
committed by GitHub
parent 1e5ec362f7
commit 9d7293734a
3 changed files with 7 additions and 0 deletions

View File

@@ -12,3 +12,8 @@ using namespace frc;
const char* SendableChooserBase::kDefault = "default";
const char* SendableChooserBase::kOptions = "options";
const char* SendableChooserBase::kSelected = "selected";
/**
* Instantiates a SendableChooser.
*/
SendableChooserBase::SendableChooserBase() : SendableBase(false) {}