Add .type metadata to preferences table (#701)

Allows shuffleboard to automatically discover the type, instead of inflexibly hardcoding it
This commit is contained in:
Sam Carlberg
2017-10-31 00:50:49 -04:00
committed by Peter Johnson
parent a70687aaec
commit 237b2df82f
2 changed files with 2 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ static llvm::StringRef kTableName{"Preferences"};
Preferences::Preferences()
: m_table(nt::NetworkTableInstance::GetDefault().GetTable(kTableName)) {
m_table->GetEntry(".type").SetString("RobotPreferences");
m_listener = m_table->AddEntryListener(
[=](nt::NetworkTable* table, llvm::StringRef name,
nt::NetworkTableEntry entry, std::shared_ptr<nt::Value> value,