New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using rc values in plugins #68
Comments
Hi! Since you are the first one really using this feature I never really thought about that problem. You are right. At the moment there is no way to check for a plugin if the data is up to date. I'd propose to add the timestamp to the shared memory structure (add timestamp here). That way a plugin can check if the data was updated recently. |
Alternatively I could add a check to the control module. I have a 1Hz loop running there for sending status updates. If the RC values are too old I'd set them to 5000 or something. That would add a delay of 1s. Not sure about that. |
Hi seeul8er Thanks for your help!! I added the suggested changes to my fork https://github.com/hex0r/DroneBridge
I add also a python example to the plugins folder for demonstrating. thx Arnold |
Hi all,
First of all awesome project , thanks for sharing
I try to use the project for a rover, without any flight controller
So i wrote a plugin to get the rc values to control the rover with odrives
If some interested, this is my python version of the rc example plugin
additional i have removed the write_to_serial int the DB_RC_PORT section of the control_main_air.c which have some blocking behavior due to there is not FC connected (quick and dirty)
But my question is:
if i unplug the joystick or lose connection, the RC values in the shared memory remain unchanged.
How could i set them to zero or something else if connection get lost to turn off the motors of the rover
or is there an other option to check if RC is working inside a plugin?
thx for your help
The text was updated successfully, but these errors were encountered: