|
Re: Hot swapping code
if you really wanted to, you could just make the 2 versions of code you want, say code A and B, separated by packages.
In the robot main class outside of packages A and B, run an init method to detect from the RIO a .txt file with a single character: A or B.
If A, call the Package A main class in teleopPeriodic(), etc.
If B, call the Package B main class.
This would only work with iterative, i don't know if it will work with Command or Simple.
This way you can just change a .txt file on the RIO and you don't have to recompile or rebuild, since both packages will be on the RIO. Dunno about memory usage though.
edit: you could also just do something on smartdashboard. that simplifies the whole txt file thing.
__________________
2791 (2012-2017)
Last edited by jtrv : 13-01-2015 at 12:42.
|