mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 16:13:33 +08:00
Added room in land_detector code for free-fall detection
This commit is contained in:
@@ -52,6 +52,9 @@
|
||||
#include <uORB/topics/manual_control_setpoint.h>
|
||||
#include <systemlib/param/param.h>
|
||||
|
||||
namespace landdetection
|
||||
{
|
||||
|
||||
class MulticopterLandDetector : public LandDetector
|
||||
{
|
||||
public:
|
||||
@@ -66,7 +69,7 @@ protected:
|
||||
/**
|
||||
* @brief Runs one iteration of the land detection algorithm
|
||||
**/
|
||||
virtual bool update() override;
|
||||
virtual LandDetectionResult update() override;
|
||||
|
||||
/**
|
||||
* @brief Initializes the land detection algorithm
|
||||
@@ -83,6 +86,11 @@ protected:
|
||||
**/
|
||||
bool get_landed_state();
|
||||
|
||||
/**
|
||||
* @brief returns true if multicopter is in free-fall state
|
||||
**/
|
||||
bool get_freefall_state();
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
@@ -120,4 +128,6 @@ private:
|
||||
uint64_t _landTimer;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif //__MULTICOPTER_LAND_DETECTOR_H__
|
||||
|
||||
Reference in New Issue
Block a user