Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Fix Preferences to Use New NetworkTables Interface #1

Open
stulewin opened this issue Feb 11, 2023 · 0 comments
Open

Fix Preferences to Use New NetworkTables Interface #1

stulewin opened this issue Feb 11, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@stulewin
Copy link
Contributor

stulewin commented Feb 11, 2023

Using default Table of "Preferences" not "501Prefs". Not sure methods are at all right.

This is code snippet from Chief Delphi question:
` NetworkTableInstance inst = NetworkTableInstance.getDefault();
NetworkTable table = inst.getTable("501Prefs");

  StringTopic configTopic = table.getStringTopic("config");
  configTopic.setPersistent(true);
  configTopic.setRetained(true);

  configPub = configTopic.publish();
  configPub.set(VersionInfo.version);
  configPub.close();`

Still need to publish before persist.
Also use the tree hierarchy instead of dot name notation. "501Prefs/Arm/P" not "Preferences/Arm.P"

@stulewin stulewin added the enhancement New feature or request label Feb 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant