Quote:
Originally Posted by Hsifeulbhsifder
Yep, I am just experimenting with stuff in my free time, seeing what I can do. The purpose of this was to see if I could dynamically load the c++ compiled code into a DLL so that I can tweak values without having to kill the running program. I have the main FRCUserProgram running code that applies only to all the hardware related aspects. This code stores all the necessary memory which is then passed into the dll every iteration. If the dll should change, the same memory is pushed into the new dll and it operates upon the memory as I intended the change to. I think this is called live loop editing.
|
We actually achieve the same thing through a different mechanism.
Our robot code is split up into a bunch of processes (each is a separate binary). There is 1 process which has WPILib built into it and interfaces to the hardware. The other processes have our control loops, joystick code, autonomous mode, etc. They all communicate via a shared memory mechanism we designed. The really cool part is that this lets us re-start the various modules and replace them without taking the rest of the code down or restart it. We've been able to do things like deploy new joystick code while the driver was driving.