mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 10:31:37 +08:00
MulticopterLandDetector: use hysteresis lib
The hysteresis was not properly implemented in the land detector and is therefore replaced by the library call, both for the freefall detector and the land detector.
This commit is contained in:
@@ -53,6 +53,7 @@
|
||||
#include <uORB/topics/control_state.h>
|
||||
#include <uORB/topics/vehicle_control_mode.h>
|
||||
#include <systemlib/param/param.h>
|
||||
#include <systemlib/hysteresis/hysteresis.h>
|
||||
|
||||
namespace landdetection
|
||||
{
|
||||
@@ -136,9 +137,10 @@ private:
|
||||
struct control_state_s _ctrl_state;
|
||||
struct vehicle_control_mode_s _ctrl_mode;
|
||||
|
||||
uint64_t _landTimer; ///< timestamp in microseconds since a possible land was detected
|
||||
uint64_t _freefallTimer; ///< timestamp in microseconds since a possible freefall was detected
|
||||
uint64_t _min_trust_start; ///< timestamp when minimum trust was applied first
|
||||
|
||||
systemlib::Hysteresis _freefall_hysteresis;
|
||||
systemlib::Hysteresis _landed_hysteresis;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user