mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-30 01:53:34 +08:00
land_detector: use user-defined literals for time constants
This commit is contained in:
@@ -42,12 +42,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include <uORB/topics/airspeed.h>
|
||||
#include <uORB/topics/sensor_bias.h>
|
||||
#include <uORB/topics/vehicle_local_position.h>
|
||||
|
||||
#include "LandDetector.h"
|
||||
|
||||
using namespace time_literals;
|
||||
|
||||
namespace land_detector
|
||||
{
|
||||
|
||||
@@ -67,8 +70,8 @@ protected:
|
||||
private:
|
||||
|
||||
/** Time in us that landing conditions have to hold before triggering a land. */
|
||||
static constexpr uint64_t LANDED_TRIGGER_TIME_US = 2000000;
|
||||
static constexpr uint64_t FLYING_TRIGGER_TIME_US = 0;
|
||||
static constexpr hrt_abstime LANDED_TRIGGER_TIME_US = 2_s;
|
||||
static constexpr hrt_abstime FLYING_TRIGGER_TIME_US = 0_us;
|
||||
|
||||
struct {
|
||||
param_t maxVelocity;
|
||||
|
||||
Reference in New Issue
Block a user