![]() |
Hot swapping code
Just wondering if anyone knows if the roboRIO supports hot swapping, or is it possible if I add some java parameters to the roboRIO to enable hot swapping. I have used hot swapping on my computer before but I don't know how the roboRIO VM works.
|
Quote:
This year, the code redeploy is really fast, like 7 seconds from compile to running. Is this really too slow that you need hotswapping? |
Re: Hot swapping code
We found that with 11 second compile times and 7 second reboots, we don't need to hot-swap anything.
|
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. |
Re: Hot swapping code
Ah ha, I did some more digging and I found this in the debug launch for the roboRIO
Code:
/usr/local/frc/JRE/bin/java -XX:+UsePerfData -agentlib:jdwp=transport=dt_socket,address=8348,server=y,suspend=y -jar /home/lvuser/FRCUserProgram.jar |
| All times are GMT -5. The time now is 22:37. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi