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

@@ -63,6 +63,7 @@ public class Preferences {
*/
private Preferences() {
m_table = NetworkTableInstance.getDefault().getTable(TABLE_NAME);
m_table.getEntry(".type").setString("RobotPreferences");
// Listener to set all Preferences values to persistent
// (for backwards compatibility with old dashboards).
m_table.addEntryListener(