Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Preferences for Robot Through SmartDashboard (http://www.chiefdelphi.com/forums/showthread.php?t=140179)

King Nerd III 12-10-2015 03:06 PM

Preferences for Robot Through SmartDashboard
 
Hello,
My team is doing an offseason project and I've been playing around with the ability to set preferences for the robot through the SmartDashboard question. I haven't figured out a best place to retrieve those values yet (we use the Command Based robot, just incase that helps) and I was wondering if I could have multiple preference objects, probably one in each file we need a value. Is this something that will work? If so, will that mean that each time I create a preference object I need to have a different preferences window in the SmartDashboard?
Thanks,
Isaac

euhlmann 12-18-2015 07:05 PM

Re: Preferences for Robot Through SmartDashboard
 
Quote:

Originally Posted by King Nerd III (Post 1511141)
Hello,
My team is doing an offseason project and I've been playing around with the ability to set preferences for the robot through the SmartDashboard question. I haven't figured out a best place to retrieve those values yet (we use the Command Based robot, just incase that helps) and I was wondering if I could have multiple preference objects, probably one in each file we need a value. Is this something that will work? If so, will that mean that each time I create a preference object I need to have a different preferences window in the SmartDashboard?
Thanks,
Isaac

From what I understand, there is only one instance of Preferences which you can access through Preferences->GetInstance()
Why do you need multiple preference objects? You can add an arbitrary number of values to the single instance.

King Nerd III 01-13-2016 03:30 PM

Re: Preferences for Robot Through SmartDashboard
 
Quote:

Originally Posted by euhlmann (Post 1513469)
From what I understand, there is only one instance of Preferences which you can access through Preferences->GetInstance()
Why do you need multiple preference objects? You can add an arbitrary number of values to the single instance.

Sorry for the long pause in the posting here, but yes, I figured it out. I have to create an object in each subsystem to use it. So far the Preferences has been really nice to use.


All times are GMT -5. The time now is 09:16 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi