-
Notifications
You must be signed in to change notification settings - Fork 16.8k
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
Allow ignoring RC input #9004
Allow ignoring RC input #9004
Conversation
8891b71
to
b02a992
Compare
I tested this in SITL and with real hardware using Plane. The copter changes on |
The last change is a big concern. I think there was a change at some point which as led to the throttle and other channels being passed through to the rest of the flight code when it shouldn't be. So I think we need to investigate if during an RC failsafe event (or partial event - i.e. missed frame or throttle pulled low) we see the flight mode code (in any mode!) react to the throttle going low. |
I take back what I said about the "Copter: Remove redundant throttle channel setting". It doesn't affect the current behaviour so I have no problem with it going in. We have an existing issue with the inputs being processed during a failsafe but I think we will resolve that by adding checks all over the place including in the flight mode code. |
I'm not a fan of the parameter. I do think we need parameters to control RC input, but I'd prefer to see RC_PROTOCOL as an enum, defaulting to AUTO, plus a RC_OPTIONS bitmask for things like this. |
65c7956
to
a34c175
Compare
Reworked to |
can you make it a AP_Int32? otherwise we'll just run out of bits. |
a34c175
to
1747657
Compare
Saves ~1100 bytes of flash
1747657
to
19bc075
Compare
@tridge done |
This is a bit of a weird one, when using purely override sources I don't want to allow noise on an input pin to be decoded as a valid input (something I've seen before on long runs of a Pixhawk on the bench). This adds a bitmask that can flag either RC reciever or MAVLink override packets as invalid.
There was a smaller patch set then this, however it required running the check twice. This version collapses the
RC_Channel::read()
andRC_Channel::set_pwm()
into a single helper function. This actually is better from an API/cleanliness perspective. It hides more of the internal state into RC_Channel. The only external caller of these functions was inSRV_Channels::copy_radio_in_out()
, which is actually a bug as it was a NOP. (callingRC_Channel::read()
simply returns a value, without updating any internal state)