mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-07 09:41:35 +08:00
land detector: reverted scientific notation unwanted doubles
This commit is contained in:
committed by
Lorenz Meier
parent
03d7b65299
commit
b79e4ab506
@@ -127,10 +127,10 @@ protected:
|
|||||||
static constexpr uint32_t LAND_DETECTOR_UPDATE_RATE_HZ = 50;
|
static constexpr uint32_t LAND_DETECTOR_UPDATE_RATE_HZ = 50;
|
||||||
|
|
||||||
/* Time in us that landing conditions have to hold before triggering a land. */
|
/* Time in us that landing conditions have to hold before triggering a land. */
|
||||||
static constexpr uint64_t LAND_DETECTOR_TRIGGER_TIME_US = 2e6;
|
static constexpr uint64_t LAND_DETECTOR_TRIGGER_TIME_US = 2000000;
|
||||||
|
|
||||||
/* Time interval in us in which wider acceptance thresholds are used after arming. */
|
/* Time interval in us in which wider acceptance thresholds are used after arming. */
|
||||||
static constexpr uint64_t LAND_DETECTOR_ARM_PHASE_TIME_US = 2e6;
|
static constexpr uint64_t LAND_DETECTOR_ARM_PHASE_TIME_US = 2000000;
|
||||||
|
|
||||||
orb_advert_t _landDetectedPub;
|
orb_advert_t _landDetectedPub;
|
||||||
struct vehicle_land_detected_s _landDetected;
|
struct vehicle_land_detected_s _landDetected;
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ bool MulticopterLandDetector::_get_landed_state()
|
|||||||
|
|
||||||
// Return status based on armed state and throttle if no position lock is available.
|
// Return status based on armed state and throttle if no position lock is available.
|
||||||
if (_vehicleLocalPosition.timestamp == 0 ||
|
if (_vehicleLocalPosition.timestamp == 0 ||
|
||||||
hrt_elapsed_time(&_vehicleLocalPosition.timestamp) > 0.5e6 ||
|
hrt_elapsed_time(&_vehicleLocalPosition.timestamp) > 500000 ||
|
||||||
!_vehicleLocalPosition.xy_valid ||
|
!_vehicleLocalPosition.xy_valid ||
|
||||||
!_vehicleLocalPosition.z_valid) {
|
!_vehicleLocalPosition.z_valid) {
|
||||||
|
|
||||||
@@ -188,7 +188,7 @@ bool MulticopterLandDetector::_get_landed_state()
|
|||||||
// falling consider it to be landed. This should even sustain
|
// falling consider it to be landed. This should even sustain
|
||||||
// quite acrobatic flight.
|
// quite acrobatic flight.
|
||||||
if ((_min_trust_start > 0) &&
|
if ((_min_trust_start > 0) &&
|
||||||
(hrt_elapsed_time(&_min_trust_start) > 8e6)) {
|
(hrt_elapsed_time(&_min_trust_start) > 8000000)) {
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user