mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 13:03:34 +08:00
Cherry pick the directory and voted_sensors_update.h from PR #9756.
Consolidate _update_params() methods for improved inheritance from the LandDetector base class. Move common uORB::Subscriptions to the base class for inheritance. Deprecate redundant override methods.
This commit is contained in:
@@ -86,17 +86,19 @@ MulticopterLandDetector::MulticopterLandDetector()
|
||||
|
||||
void MulticopterLandDetector::_update_topics()
|
||||
{
|
||||
LandDetector::_update_topics();
|
||||
|
||||
_actuator_controls_sub.update(&_actuator_controls);
|
||||
_battery_sub.update(&_battery_status);
|
||||
_vehicle_acceleration_sub.update(&_vehicle_acceleration);
|
||||
_vehicle_angular_velocity_sub.update(&_vehicle_angular_velocity);
|
||||
_vehicle_control_mode_sub.update(&_vehicle_control_mode);
|
||||
_vehicle_local_position_sub.update(&_vehicle_local_position);
|
||||
_vehicle_local_position_setpoint_sub.update(&_vehicle_local_position_setpoint);
|
||||
}
|
||||
|
||||
void MulticopterLandDetector::_update_params()
|
||||
void MulticopterLandDetector::_update_params(const bool force)
|
||||
{
|
||||
LandDetector::_update_params(force);
|
||||
|
||||
_freefall_hysteresis.set_hysteresis_time_from(false, (hrt_abstime)(1e6f * _param_lndmc_ffall_ttri.get()));
|
||||
|
||||
param_get(_paramHandle.minThrottle, &_params.minThrottle);
|
||||
|
||||
Reference in New Issue
Block a user