View Single Post
  #2   Spotlight this post!  
Unread 24-01-2016, 13:03
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,561
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Robot preferences help

Quote:
Originally Posted by ahartnet View Post
1) should this go in the robot init like in the example? Doesn't that mean you need to reboot the Rio every time you change the file?
We typically read preferences either in disabled init or inline with where the data is used (based on how often we want to be able to updated it).

Quote:
Originally Posted by ahartnet View Post
2) we can't seem to get anything to show up in the preferences. The things that I have found in the forums are a couple of years old so I'm not sure if it's changed.
The code on screensteps doesn't put any data to the preferences, just reads existing data. You can either add the data using SmartDashboard, or put it in your code. Generally, if our robot code reads a value and it doesn't exist the code immediately puts a default value to preferences.

Quote:
Originally Posted by ahartnet View Post
3) if we create a key in the preferences table that doesn't exist in the code does that have any impact?
No.

Quote:
Originally Posted by ahartnet View Post
4) we trying declaring the variables as public in our robot.java but while in other commands or subsystems it doesn't seem like we could use them. Is there something I'm missing there?
You need to references them as Robot.value. Or you could just read the preferences in your command or subsystem.
Reply With Quote