|
Re: Accessing files on the driver station laptop from the robot
There was a new feature added to network tables this last year called persistence.
You can programmatically set persistence on a variable, using the Get or Update Persistence VIs (with blue floppies on the icon), or you can double-click on a variable in the dashboard to set or shift double-click to clear it.
What is persistence?
It means that the robot code will write the value to an ini-based file to keep the last known value. This is primarily for PID or pot tunings, and not as good for an auto-recipe. But if you think about it, as long as it is in network tables, it is the same on both sides. So you don't need to put the file on the robot. You can just read the file on the DB and update the variable(s) and they will show up on the robot. You can also persist them so that this is only needed when it changes.
To your original question, you can write a new program, use a command line batch file, or add code to a custom DB in order to read a file on the push of a button and send it to the robot using ftp, sftp, DAV, etc. You will need to make sure that the robot knows when to read the new file, and make sure that it is convenient to run that code.
A more manual method would be to put the file on a memory stick and insert it into the roboRIO's USB host port.
Greg McKaskle
|