add migration formula

This commit is contained in:
ttechnick
2025-11-17 13:58:39 +01:00
parent 9a5109af6c
commit 2b53193b5d
2 changed files with 5 additions and 1 deletions
+3
View File
@@ -654,6 +654,9 @@ For each of the tilt servos:
- Standard VTOL : Motors defined as multicopter motors will be turned off
- Tiltrotors : Motors that have no associated tilt servo will turn off
- Tailsitters do not turn off any motors in fixed-wing flight
- The following formula can be used to migrate from surface trim to PWM trim:
`PWM_MAIN_TRIMx = ((PWM_MAX - PWM_MIN) / 2) * CA_SV_CSx_TRIM + TRIM_MIN + ((PWM_MAX - PWM_MIN) / 2)`
### Reversing Motors
@@ -80,7 +80,8 @@ void ActuatorEffectivenessControlSurfaces::updateParams()
snprintf(param_name, sizeof(param_name), "%s_TRIM%d", prefix, channel);
param_t param = param_find(param_name);
if (param != PARAM_INVALID) {
if (param != PARAM_INVALID)
{
int32_t value;
return (param_get(param, &value) == PX4_OK && value != 1500);
}