View Single Post
  #6   Spotlight this post!  
Unread 09-01-2012, 18:20
JohnGilb JohnGilb is offline
Programming Mentor, Drive Mentor
FRC #0488
 
Join Date: Mar 2011
Rookie Year: 2003
Location: Redmond, WA
Posts: 116
JohnGilb has a spectacular aura aboutJohnGilb has a spectacular aura aboutJohnGilb has a spectacular aura about
Re: What are you doing different from last year?

It all sounds great!

One thing I've been struggling with is along the lines of saving/updating "ini" files on the robot. Ideally you'd be able to modify key robot parameters from the Driver Station dashboard (so you don't need any additional computers).

I've been trying to figure out the best way to do this. My general requirements have been as follows:
-No extra computers are needed to make on-the-fly changes
-Newer versions of Robot Code (that change the # or type of constants) should not require recompile/redeploy of DS Dashboard code

So far, here was what we had come up with:
1) Robot reads constants from XML document on cRIO
2) Robot unflattens from XML, turning it into a typedef for use internally
3) If robot gets a request from DS as to what the current constants are, it flattens the tyepdef to XML and sends it as a string
4) DS can modify the string (typedefs flattened to xml are quite human-readable), and send back a new one (after doing some quick verification to make sure it's still valid)
5) Robot receives the data, saves it, and applies the new constants to the running program

Sending XML helps decouple the DS and the Robot, but at the cost of needing to do some kind of XML validation again somewhere. I'm wondering if there is a more elegant way to do this.
Reply With Quote