mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 14:53: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:
@@ -67,7 +67,7 @@ public:
|
||||
MulticopterLandDetector();
|
||||
|
||||
protected:
|
||||
void _update_params() override;
|
||||
void _update_params(const bool force = false) override;
|
||||
void _update_topics() override;
|
||||
|
||||
bool _get_landed_state() override;
|
||||
@@ -79,7 +79,7 @@ protected:
|
||||
float _get_max_altitude() override;
|
||||
private:
|
||||
|
||||
/* get control mode dependent pilot throttle threshold with which we should quit landed state and take off */
|
||||
/** Get control mode dependent pilot throttle threshold with which we should quit landed state and take off. */
|
||||
float _get_takeoff_throttle();
|
||||
|
||||
bool _has_low_thrust();
|
||||
@@ -100,9 +100,7 @@ private:
|
||||
/** Time interval in us in which wider acceptance thresholds are used after landed. */
|
||||
static constexpr hrt_abstime LAND_DETECTOR_LAND_PHASE_TIME_US = 2_s;
|
||||
|
||||
/**
|
||||
* @brief Handles for interesting parameters
|
||||
**/
|
||||
/** Handles for interesting parameters. **/
|
||||
struct {
|
||||
param_t minThrottle;
|
||||
param_t hoverThrottle;
|
||||
@@ -127,10 +125,8 @@ private:
|
||||
|
||||
actuator_controls_s _actuator_controls {};
|
||||
battery_status_s _battery_status {};
|
||||
vehicle_acceleration_s _vehicle_acceleration{};
|
||||
vehicle_angular_velocity_s _vehicle_angular_velocity{};
|
||||
vehicle_control_mode_s _vehicle_control_mode {};
|
||||
vehicle_local_position_s _vehicle_local_position {};
|
||||
vehicle_local_position_setpoint_s _vehicle_local_position_setpoint {};
|
||||
|
||||
hrt_abstime _min_trust_start{0}; ///< timestamp when minimum trust was applied first
|
||||
|
||||
Reference in New Issue
Block a user