mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-11 17:13:56 -03:00
Plane: setup PWM to be used on throttle when safety is safe on PX4
This commit is contained in:
parent
db1d438e97
commit
30a210cfa6
@ -18,6 +18,10 @@ static void set_control_channels(void)
|
||||
channel_pitch->set_angle(SERVO_MAX);
|
||||
channel_rudder->set_angle(SERVO_MAX);
|
||||
channel_throttle->set_range(0, 100);
|
||||
|
||||
if (!arming.is_armed() && arming.arming_required() == AP_Arming::YES_MIN_PWM) {
|
||||
hal.rcout->set_safety_pwm(1UL<<(rcmap.throttle()-1), channel_throttle->radio_min);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -62,6 +66,12 @@ static void init_rc_out()
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
|
||||
servo_write(CH_12, g.rc_12.radio_trim);
|
||||
#endif
|
||||
|
||||
// setup PX4 to output the min throttle when safety off if arming
|
||||
// is setup for min on disarm
|
||||
if (arming.arming_required() == AP_Arming::YES_MIN_PWM) {
|
||||
hal.rcout->set_safety_pwm(1UL<<(rcmap.throttle()-1), channel_throttle->radio_min);
|
||||
}
|
||||
}
|
||||
|
||||
// check for pilot input on rudder stick for arming
|
||||
|
Loading…
Reference in New Issue
Block a user