mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-18 06:38:29 -04:00
SRV_Channel: Remove the trim_all interface, constrain failsafes to non motor outputs
This commit is contained in:
parent
460455a687
commit
8850e4b9a1
@ -312,11 +312,8 @@ public:
|
||||
flags.k_throttle_reversible = true;
|
||||
}
|
||||
|
||||
// set all outputs to the TRIM value
|
||||
static void output_trim_all(void);
|
||||
|
||||
// setup IO failsafe for all channels to trim
|
||||
static void setup_failsafe_trim_all(void);
|
||||
static void setup_failsafe_trim_all_non_motors(void);
|
||||
|
||||
// set output for all channels matching the given function type, allow radio_trim to center servo
|
||||
static void set_output_pwm_trimmed(SRV_Channel::Aux_servo_function_t function, int16_t value);
|
||||
|
@ -178,19 +178,14 @@ void SRV_Channels::save_trim(void)
|
||||
trimmed_mask = 0;
|
||||
}
|
||||
|
||||
void SRV_Channels::output_trim_all(void)
|
||||
{
|
||||
for (uint8_t i=0; i<NUM_SERVO_CHANNELS; i++) {
|
||||
channels[i].set_output_pwm(channels[i].servo_trim);
|
||||
}
|
||||
}
|
||||
|
||||
void SRV_Channels::setup_failsafe_trim_all(void)
|
||||
void SRV_Channels::setup_failsafe_trim_all_non_motors(void)
|
||||
{
|
||||
for (uint8_t i = 0; i < NUM_SERVO_CHANNELS; i++) {
|
||||
if (!SRV_Channel::is_motor(channels[i].get_function())) {
|
||||
hal.rcout->set_failsafe_pwm(1U<<channels[i].ch_num, channels[i].servo_trim);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
run calc_pwm for all channels
|
||||
|
Loading…
Reference in New Issue
Block a user