drivers/pwm_out: set default failsafe values

This commit is contained in:
Igor Mišić
2022-06-16 08:09:00 +02:00
committed by Beat Küng
parent 1980b5c5e8
commit 04c2d0fe97
2 changed files with 13 additions and 0 deletions
+8
View File
@@ -613,6 +613,14 @@ void PWMOut::update_params()
int32_t pwm_fail_new = _mixing_output.failsafeValue(i);
param_set(param_find(str), &pwm_fail_new);
}
} else {
if (pwm_default_channel_mask & 1 << i) {
_mixing_output.failsafeValue(i) = PWM_MOTOR_OFF;
} else {
_mixing_output.failsafeValue(i) = PWM_SERVO_STOP;
}
}
} else {