mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-03 22:20:34 +08:00
Consume speedweight from FW longitudinal config (#25709)
* Consume speedweight from longitudinal config * Constrain speed weight
This commit is contained in:
@@ -827,6 +827,12 @@ void FwLateralLongitudinalControl::updateLongitudinalControlConfiguration(const
|
||||
} else {
|
||||
_long_configuration.sink_rate_target = _param_sinkrate_target.get();
|
||||
}
|
||||
|
||||
if (PX4_ISFINITE(configuration_in.speed_weight)) {
|
||||
_long_configuration.speed_weight = math::constrain(configuration_in.speed_weight, 0.f, 2.f);
|
||||
} else {
|
||||
_long_configuration.speed_weight = _param_t_spdweight.get();
|
||||
}
|
||||
}
|
||||
|
||||
float FwLateralLongitudinalControl::getLoadFactor() const
|
||||
|
||||
Reference in New Issue
Block a user