mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 01:43:33 +08:00
land_detector: battery level status to adjust maximum altitude possible
This commit is contained in:
committed by
Lorenz Meier
parent
c8690fd072
commit
a1982e0392
@@ -51,6 +51,7 @@
|
||||
#include <uORB/topics/manual_control_setpoint.h>
|
||||
#include <uORB/topics/control_state.h>
|
||||
#include <uORB/topics/vehicle_control_mode.h>
|
||||
#include <uORB/topics/battery_status.h>
|
||||
|
||||
#include "LandDetector.h"
|
||||
|
||||
@@ -74,6 +75,8 @@ protected:
|
||||
virtual bool _get_ground_contact_state() override;
|
||||
|
||||
virtual bool _get_freefall_state() override;
|
||||
|
||||
virtual float _get_max_altitude() override;
|
||||
private:
|
||||
|
||||
/**
|
||||
@@ -90,6 +93,7 @@ private:
|
||||
param_t freefall_acc_threshold;
|
||||
param_t freefall_trigger_time;
|
||||
param_t manual_stick_down_threshold;
|
||||
param_t altitude_max;
|
||||
} _paramHandle;
|
||||
|
||||
struct {
|
||||
@@ -103,6 +107,7 @@ private:
|
||||
float freefall_acc_threshold;
|
||||
float freefall_trigger_time;
|
||||
float manual_stick_down_threshold;
|
||||
float altitude_max;
|
||||
} _params;
|
||||
|
||||
int _vehicleLocalPositionSub;
|
||||
@@ -112,6 +117,7 @@ private:
|
||||
int _manualSub;
|
||||
int _ctrl_state_sub;
|
||||
int _vehicle_control_mode_sub;
|
||||
int _battery_sub;
|
||||
|
||||
struct vehicle_local_position_s _vehicleLocalPosition;
|
||||
struct actuator_controls_s _actuators;
|
||||
@@ -120,6 +126,7 @@ private:
|
||||
struct manual_control_setpoint_s _manual;
|
||||
struct control_state_s _ctrl_state;
|
||||
struct vehicle_control_mode_s _control_mode;
|
||||
struct battery_status_s _battery;
|
||||
|
||||
uint64_t _min_trust_start; ///< timestamp when minimum trust was applied first
|
||||
uint64_t _arming_time;
|
||||
|
||||
Reference in New Issue
Block a user