RC_Channel dead_zone is used in PWM range as well as in control/servo range
Class RC_Channel, when in RC_CHANNEL_TYPE_RANGE mode, features conversion of the "backend" radio PWM range [radio_min..radio_max] to a user defined range [_low .. _high].
The member _dead_zone specifies a value for which input below it should be considered zero. It is inconsistent whether dead_zone is a value in the [radio_min..radio_max] interval or the [_low .. _high] control_in interval or the [_low_out.._high_out] servo_out interval: in set_pwm(int16_t) _dead is compared to control_in (a [_low .. _high] value) in pwm_to_range() it is (via pwm_to_range_dz) added to radio_min (a [radio_min..radio_max] value).
Not too serious if the intervals are of about the same width. Are they?
They are normally pretty close at least for the throttle channel. They're not close at all for the roll, pitch and yaw though. We should probably rewrite the RC_Channel library some time. It's very old and is overly confusing.
I was about to suggest the same rewrite myself. Maybe at a time in the summer, I will have some time with nothing to do than coding for 2 weeks. In that case I will volunteer :) Have some ideas already.
On Tue, May 28, 2013 at 3:20 PM, Randy Mackay [email protected]:
They are normally pretty close at least for the throttle channel. They're not close at all for the roll, pitch and yaw though. We should probably rewrite the RC_Channel library some time. It's very old and is overly confusing.
— Reply to this email directly or view it on GitHubhttps://github.com/diydrones/ardupilot/issues/303#issuecomment-18549615 .
Thanks very much for spotting this Soren. The intervals were the same width for copter, but not for plane. For planes we had set a very small deadzone of 3 on the throttle channel to work around this problem. It should be fixed properly now.