-
Notifications
You must be signed in to change notification settings - Fork 19.5k
Move rudder arming up into RC_Channel library #16091
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
Move rudder arming up into RC_Channel library #16091
Conversation
5570908
to
f71ac3b
Compare
e7c327b
to
827ff0d
Compare
827ff0d
to
8bc7e33
Compare
8bc7e33
to
65df351
Compare
157f4c3
to
9ef65ee
Compare
9ef65ee
to
24377cf
Compare
Tested in SITL - standard arming and RUDDER_DISARM values. |
ab489a5
to
2815824
Compare
@rmackay9 also noted on the call that he's happy for the 10s trim feature to be removed if whoever removes it ensures docs are updated |
Docs for autotrim are here: https://ardupilot.org/copter/docs/autotrim.html and here: https://ardupilot.org/copter/docs/arming_the_motors.html. The 2nd link in particular has a warning that could be updated to be clear it only applies to 4.0 (and earlier) |
stops uwarning the user instantly
we do not run the arming checks if ARMING_CHECK is zero
this was ineffective as Blimp was not enforcing the parameter. We do now
as required by PR feedback (ArduPilot#16091) and my DevCall decision.
it was decided that your throttle-is-zero check was really part of the gesture and thus belonged in RC_Channels, not in AP_Arming.
c6ef41f
to
90a1319
Compare
it was decided that your throttle-is-zero check was really part of the gesture and thus belonged in RC_Channels, not in AP_Arming.
as determined at DevCall
as determined at DevCall
- does it really matter if the user does this when they can just throttle up to take off? - stops spreading oymode stuff through the code - kind of weird doing this in Arming anyway
as opposed to trying to arm and have the arming library say no
for setting a single bit
90a1319
to
f511676
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy for this to be merged once @andyp1per has completed his testing and has approved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think its ok, just a couple of questions
// only permit arming if the vehicle isn't being commanded to | ||
// move via RC input | ||
const auto &c = rc().get_throttle_channel(); | ||
if (c.get_control_in() != 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't you want to use the deadzone version here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so - this is pilot stick input we want to be inactive. It would be really, really difficult for a Rover user to get zero input on a mid-stick-is-zero throttle input without a dz :-)
} | ||
|
||
if (method == AP_Arming::Method::RUDDER) { | ||
if (!copter.flightmode->has_manual_throttle() && !copter.ap.land_complete) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering whether we should remove the manual throttle check here. Disarming mid-air at zero throttle, full yaw seems bad.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks AndyP very much for helping test this important PR
we should certainly be careful about changes in behaviour because it is also bad to be unable to disarm the vehicle waiting for the land-complete to become true. That can lead to vehicles flopping around on the ground.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't given this enough thought one way or the other. I absolutely don't want to change something so fundamental/dangerous in this PR.
I do agree mid-air-accidental-disarms sound very bad. But we might end up with people not able to disarm depending on how the landing detector modifies its behaviour based on manual throttle etc etc.
We could document our way out of it - suggest people doing inverted yaw spins may want to set the disarm-via-stick to false. We could potentially change the default value to disallow it in minimize-fpv-osd setups. We could say that if you've armed-with-a-switch-with-airmode then we don't do it. Lots of options, lots of thought, a very small amount of coding, a lot of testing!
I'd also say that I've never actually heard of someone managing to hit this problem - I do find that a bit of a surprise.
tldr; sure, we need to think about it, but I do not want to do it as part of this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking that perhaps the right check was manual throttle without airmode, that would probably cover the majority case in a safe way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking that perhaps the right check was manual throttle without airmode, that would probably cover the majority case in a safe way.
Probably right - but not for this PR.
Are you OK with this one, @andyp1per ?
as required by PR feedback (#16091) and my DevCall decision.
This will make rudder-arming consistent across our vehicles.
One known behaviour change is that the rover arm interval has moved from 2 to 3 seconds (to be like Copter and Plane).
Other known changes in behaviour:
We can't move the rudder-specific arming checks into the RC_Channels library as ToyMode also arms with a reason of "rudder" and presumably wants the same checksWe did some surgery to fix this