RC_Channel: add RC_OPTIONS bit to clear RC override by RC input change
This PR introduces a new option to clear the RC override, allowing the pilot to regain control by operating roll, pitch, throttle, or yaw during an RC override situation. While this functionality was previously possible using RCx_OPTION(46), the new option provides a more direct and safer method for pilots to cancel overrides using basic RC inputs.
The following settings are required RC_OPTIONS=16384 // it allows to clear overrides by Roll/Pitch/Throttle/Yaw RCx_OPTION=46 // (RC Override Enable) Re-enable RC overrides
I tested this on copter SITL.
It is NG for the FC to not get permission from the CC. It is also not for the FC to take control of the CC without permission. When the FC cannot get a heartbeat from the CC, it is OK. If the CC is the primary, the FC is the limbs. When the CC is connected, the FC is a limb.
FC and CC should have a handshake procedure of "YOU HAVE" and "I HAVE".
PX4 has handshake in FC and MC. PX4 has an OFFBOARD mode. The ArduPilot needs to implement this OFFBOARD mode equivalent.
@muramura In this PR, the AP's permission to clear Override can be set in RC_OPTIONS.
Txs for this. In general I think it is good practice for the pilot holding an RC to be able to take control away from a companion computer easily. It makes sense to make it easy for a pilot to do that by simply moving the sticks.
@rmackay9 Thank you for your reviews. I've added a commit to make the changes easier to understand, but I'm going to squash it eventually.
@rmackay9 I have used this with real rover. It works well and it's useful. Can you check this again?
This sounds like a good idea to me.
@tatsuy did you want to rebase this?
@peterbarker Thank you for your feedback. I have rebased.
@peterbarker Thank you for the review. I have made the necessary changes based on your feedback. I also confirmed the changes through SITL testing. Could you please review the updates again?
@peterbarker Thank you for the feedback! I rebased and fixed these.
We tested this today on a quadcopter and it worked very well - exactly what we were expecting.
I've put this on the EU dev call so we can review and possibly merge then