Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration folder is created under $HOME/SmartDashboard #131

Open
modelmat opened this issue Jan 12, 2020 · 0 comments
Open

Configuration folder is created under $HOME/SmartDashboard #131

modelmat opened this issue Jan 12, 2020 · 0 comments

Comments

@modelmat
Copy link
Contributor

modelmat commented Jan 12, 2020

This clogs up the $HOME directory. Discussions with others in the FIRST Robotics Discord server suggested the ~/wpilib/<year>/tools/SmartDashboard directory.

This is set with

private static final File USER_HOME = new File(System.getProperty("user.home"));
private static final File USER_SMARTDASHBOARD_HOME = new File(USER_HOME, "SmartDashboard");
as well as
private static final File EXTENSION_DIR = new File(getUserHomeDir(), "SmartDashboard/extensions");

This can be fixed with the following code (for the former at least)

 public class DashboardPrefs implements PropertyHolder {
   private static final File USER_HOME = new File(System.getProperty("user.home"));
-  private static final File USER_SMARTDASHBOARD_HOME = new File(USER_HOME, "SmartDashboard");
+  private static final String WPILIB_YEAR = "2020";
+  private static final File USER_WPILIB_HOME = new File(USER_HOME, "wpilib/" + WPILIB_YEAR);
+  private static final File USER_SMARTDASHBOARD_HOME = new File(USER_WPILIB_HOME, "/tools/SmartDashboard");

However, SmartDashboard does not seem to store a version number anywhere. I am not experienced enough with Java to figure out how to include this and would ask someone to point me in the right direction or (much easier) just add it themselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant