mirror of https://github.com/ArduPilot/ardupilot
Plane: disable parachute code when not enabled via compile option
This commit is contained in:
parent
ea9e39212f
commit
af1407a155
|
@ -593,11 +593,13 @@ void Plane::flap_slew_limit(int8_t &last_value, int8_t &new_value)
|
|||
*/
|
||||
bool Plane::suppress_throttle(void)
|
||||
{
|
||||
#if PARACHUTE == ENABLED
|
||||
if (auto_throttle_mode && parachute.release_initiated()) {
|
||||
// throttle always suppressed in auto-throttle modes after parachute release initiated
|
||||
throttle_suppressed = true;
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!throttle_suppressed) {
|
||||
// we've previously met a condition for unsupressing the throttle
|
||||
|
|
|
@ -60,11 +60,13 @@ void Plane::read_control_switch()
|
|||
inverted_flight = (control_mode != MANUAL && hal.rcin->read(g.inverted_flight_ch-1) > INVERTED_FLIGHT_PWM);
|
||||
}
|
||||
|
||||
#if PARACHUTE == ENABLED
|
||||
if (g.parachute_channel > 0) {
|
||||
if (hal.rcin->read(g.parachute_channel-1) >= 1700) {
|
||||
parachute_manual_release();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
|
||||
if (g.override_channel > 0) {
|
||||
|
|
Loading…
Reference in New Issue