Hi everyone!
I have been using Python scripts to control my drone (IRIS+) and when I was playing with the code, I have realized that my RC transmitter is not working when Mission Planner is running my Python script. After looking into Radio Calibration screen in the Mission Planner, I can see that the PWM value being sent from the transmitter does not change even if I move the sticks of the transmitter. Those values do change according to Script.SendRC() commands in my Python script.
The question is, after looking at the forum post here
http://diydrones.com/forum/topics/how-to-restore-control-back-to-rc-when-running-a-python-script-in
I have added a for loop to my code by sending 0 PWM values to all the channels. When I do that, I indeed get the control back to the transmitter, so that is a win!
While I was testing it, when I get the control back, I saw that the throttle PWM value goes to its min possible value (about 990). Since my drone did not have its propellers on, it did not cause a problem. But I guess if it was in the air, it would have had a crash, and a pretty serious one, if I might add. Because the throttle was practically at the idle, but armed position.
Is there any way that I can get control back from the Python script while keeping my drone hovering in the air? I just want to keep my drone hovering, so that the drone does not crash or lose altitude the instant I get the control back to RC transmitter.
Thank you all very much!
Best,
Pat
Replies