2021-03-13, 11:28 PM
(2021-03-11, 12:14 PM)kinefou Wrote: Hi,
Desiring to save the gains of 'Autopilot Control', I want to know when these gains are updated in .pypilot / pypilot.conf from where I could extract them with a SED command.
Seems to me that just shutting down interfaces and reopening them isn't always enough to force this update
The only way I have found is to log out and reopen it, but this is not really usable !!
Has anyone found a way to retrieve these settings other than through pypilot.conf
Thanks for you anwers
I made a concept for this once, but never made it operational https://forum.openmarine.net/showthread....24#pid9424. It was my first python project. The code worked against an old version of pypilot, but needs to be updated. The drawback was that it needed to run in a graphical environment, like openplotter. For a solution that would fit the pypilot vision, I'd say it would need to be a python process that runs in the background, and reads the current values from the pypilot data layer, the pypilotServer. Tricky thing for a newbie, but if I was able to pick it up, then you can do it as well. It would be nice of you make it such, that you can save the current gains under a name, and when retrieving them, select the name to write them back to pypilot.
I think you will be helped with attached skeleton code, that connects to pypilot and reports on the P, I and D gains. I've distilled it for you out of a piece of code of myself, which you might find helpful. Good luck!