mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
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.
20 lines
837 B
C++
20 lines
837 B
C++
/*----------------------------------------------------------------------------*/
|
|
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
|
|
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
|
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
|
/* the project. */
|
|
/*----------------------------------------------------------------------------*/
|
|
|
|
#include "SmartDashboard/SendableChooserBase.h"
|
|
|
|
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) {}
|