mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-01 03:41:36 +08:00
Added room in land_detector code for free-fall detection
This commit is contained in:
@@ -49,6 +49,9 @@
|
||||
#include <uORB/topics/airspeed.h>
|
||||
#include <systemlib/param/param.h>
|
||||
|
||||
namespace landdetection
|
||||
{
|
||||
|
||||
class FixedwingLandDetector : public LandDetector
|
||||
{
|
||||
public:
|
||||
@@ -58,7 +61,7 @@ protected:
|
||||
/**
|
||||
* @brief blocking loop, should be run in a separate thread or task. Runs at 50Hz
|
||||
**/
|
||||
bool update() override;
|
||||
LandDetectionResult update() override;
|
||||
|
||||
/**
|
||||
* @brief Initializes the land detection algorithm
|
||||
@@ -70,6 +73,16 @@ protected:
|
||||
**/
|
||||
void updateSubscriptions();
|
||||
|
||||
/**
|
||||
* @brief get UAV landed state
|
||||
**/
|
||||
bool get_landed_state();
|
||||
|
||||
/**
|
||||
* @brief returns true if UAV is in free-fall state
|
||||
**/
|
||||
bool get_freefall_state();
|
||||
|
||||
private:
|
||||
/**
|
||||
* @brief download and update local parameter cache
|
||||
@@ -109,4 +122,6 @@ private:
|
||||
uint64_t _landDetectTrigger;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif //__FIXED_WING_LAND_DETECTOR_H__
|
||||
|
||||
Reference in New Issue
Block a user