feat(CAN):Add option to center the UAVCAN servo (#28423)

This commit is contained in:
Federico Magri
2026-08-28 14:25:42 +02:00
committed by GitHub
parent 0bdf8c2fb0
commit d4ad655f4b
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -114,6 +114,7 @@ actuator_output:
standard_params:
disarmed: { min: 0, max: 1000, default: 500 }
min: { min: 0, max: 1000, default: 0 }
center: { min: 0, max: 1000 }
max: { min: 0, max: 1000, default: 1000 }
failsafe: { min: 0, max: 1000 }
num_channels: *max_num_uavcan_servos
+2 -2
View File
@@ -555,8 +555,8 @@ float MixingOutput::output_limit_calc_single(int i, float value) const
|| (_function_assignment[i] >= OutputFunction::Gimbal_Roll
&& _function_assignment[i] <= OutputFunction::Gimbal_Yaw))
&& _param_handles[i].center != PARAM_INVALID
&& _center_value[i] >= 800
&& _center_value[i] <= 2200) {
&& _center_value[i] >= _min_value[i]
&& _center_value[i] <= _max_value[i]) {
output = math::interpolateNXY(value, {-1.f, 0.f, 1.f}, {(float)_min_value[i], (float)_center_value[i], (float)_max_value[i]});
}