aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2015-01-17 23:26:43 +0100
committerLorenz Meier <lm@inf.ethz.ch>2015-01-17 23:26:43 +0100
commitb1127315b453e129753e1f59aff0b0f6906cbaac (patch)
tree89a0c61055fbbd7313e22db2d811e0d6c1e76440 /src
parent510a314386529f95978078d27da25368435d8d90 (diff)
downloadpx4-firmware-b1127315b453e129753e1f59aff0b0f6906cbaac.tar.gz
px4-firmware-b1127315b453e129753e1f59aff0b0f6906cbaac.tar.bz2
px4-firmware-b1127315b453e129753e1f59aff0b0f6906cbaac.zip
Fixed land detector param names
Diffstat (limited to 'src')
-rw-r--r--src/modules/land_detector/FixedwingLandDetector.cpp6
-rw-r--r--src/modules/land_detector/LandDetector.cpp41
-rw-r--r--src/modules/land_detector/MulticopterLandDetector.cpp10
-rw-r--r--src/modules/land_detector/land_detector_main.cpp2
-rw-r--r--src/modules/land_detector/land_detector_params.c17
5 files changed, 58 insertions, 18 deletions
diff --git a/src/modules/land_detector/FixedwingLandDetector.cpp b/src/modules/land_detector/FixedwingLandDetector.cpp
index 52084e4c0..74a197bd2 100644
--- a/src/modules/land_detector/FixedwingLandDetector.cpp
+++ b/src/modules/land_detector/FixedwingLandDetector.cpp
@@ -57,9 +57,9 @@ FixedwingLandDetector::FixedwingLandDetector() : LandDetector(),
_airspeed_filtered(0.0f),
_landDetectTrigger(0)
{
- _paramHandle.maxVelocity = param_find("LAND_FW_VEL_XY_MAX");
- _paramHandle.maxClimbRate = param_find("LAND_FW_VEL_Z_MAX");
- _paramHandle.maxAirSpeed = param_find("LAND_FW_AIRSPEED_MAX");
+ _paramHandle.maxVelocity = param_find("LNDFW_VEL_XY_MAX");
+ _paramHandle.maxClimbRate = param_find("LNDFW_VEL_Z_MAX");
+ _paramHandle.maxAirSpeed = param_find("LNDFW_AIRSPD_MAX");
}
void FixedwingLandDetector::initialize()
diff --git a/src/modules/land_detector/LandDetector.cpp b/src/modules/land_detector/LandDetector.cpp
index 1dd09b6a6..61e678b41 100644
--- a/src/modules/land_detector/LandDetector.cpp
+++ b/src/modules/land_detector/LandDetector.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+ *
+ * Copyright (c) 2013-2015 PX4 Development Team. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name PX4 nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
+/**
+ * @file LandDetector.cpp
+ * Land detection algorithm
+ *
+ * @author Johan Jansen <jnsn.johan@gmail.com>
+ * @author Morten Lysgaard <morten@lysgaard.no>
+ */
+
#include "LandDetector.h"
#include <unistd.h> //usleep
#include <drivers/drv_hrt.h>
diff --git a/src/modules/land_detector/MulticopterLandDetector.cpp b/src/modules/land_detector/MulticopterLandDetector.cpp
index 537134618..cc984f11f 100644
--- a/src/modules/land_detector/MulticopterLandDetector.cpp
+++ b/src/modules/land_detector/MulticopterLandDetector.cpp
@@ -33,7 +33,7 @@
/**
* @file MulticopterLandDetector.cpp
- * Land detection algorithm
+ * Land detection algorithm for multicopters
*
* @author Johan Jansen <jnsn.johan@gmail.com>
* @author Morten Lysgaard <morten@lysgaard.no>
@@ -62,10 +62,10 @@ MulticopterLandDetector::MulticopterLandDetector() : LandDetector(),
_landTimer(0)
{
- _paramHandle.maxRotation = param_find("LAND_MC_Z_VEL_MAX");
- _paramHandle.maxVelocity = param_find("LAND_MC_XY_VEL_MAX");
- _paramHandle.maxClimbRate = param_find("LAND_MC_ROT_MAX");
- _paramHandle.maxThrottle = param_find("LAND_MC_THR_MAX");
+ _paramHandle.maxRotation = param_find("LNDMC_Z_VEL_MAX");
+ _paramHandle.maxVelocity = param_find("LNDMC_XY_VEL_MAX");
+ _paramHandle.maxClimbRate = param_find("LNDMC_ROT_MAX");
+ _paramHandle.maxThrottle = param_find("LNDMC_THR_MAX");
}
void MulticopterLandDetector::initialize()
diff --git a/src/modules/land_detector/land_detector_main.cpp b/src/modules/land_detector/land_detector_main.cpp
index 9e135b5f1..1e43e7ad5 100644
--- a/src/modules/land_detector/land_detector_main.cpp
+++ b/src/modules/land_detector/land_detector_main.cpp
@@ -139,7 +139,7 @@ static int land_detector_start(const char *mode)
_landDetectorTaskID = task_spawn_cmd("land_detector",
SCHED_DEFAULT,
SCHED_PRIORITY_DEFAULT,
- 1024,
+ 1200,
(main_t)&land_detector_deamon_thread,
nullptr);
diff --git a/src/modules/land_detector/land_detector_params.c b/src/modules/land_detector/land_detector_params.c
index e2acf42b3..0302bc7c1 100644
--- a/src/modules/land_detector/land_detector_params.c
+++ b/src/modules/land_detector/land_detector_params.c
@@ -1,7 +1,6 @@
/****************************************************************************
*
- * Copyright (c) 2013 PX4 Development Team. All rights reserved.
- * Author: @author Anton Babushkin <anton.babushkin@me.com>
+ * Copyright (c) 2014, 2015 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -48,7 +47,7 @@
*
* @group Land Detector
*/
-PARAM_DEFINE_FLOAT(LAND_MC_Z_VEL_MAX, 0.30f);
+PARAM_DEFINE_FLOAT(LNDMC_Z_VEL_MAX, 0.30f);
/**
* Multicopter max horizontal velocity
@@ -57,7 +56,7 @@ PARAM_DEFINE_FLOAT(LAND_MC_Z_VEL_MAX, 0.30f);
*
* @group Land Detector
*/
-PARAM_DEFINE_FLOAT(LAND_MC_XY_VEL_MAX, 1.00f);
+PARAM_DEFINE_FLOAT(LNDMC_XY_VEL_MAX, 1.00f);
/**
* Multicopter max rotation
@@ -66,7 +65,7 @@ PARAM_DEFINE_FLOAT(LAND_MC_XY_VEL_MAX, 1.00f);
*
* @group Land Detector
*/
-PARAM_DEFINE_FLOAT(LAND_MC_ROT_MAX, 0.20f);
+PARAM_DEFINE_FLOAT(LNDMC_ROT_MAX, 0.20f);
/**
* Multicopter max throttle
@@ -75,7 +74,7 @@ PARAM_DEFINE_FLOAT(LAND_MC_ROT_MAX, 0.20f);
*
* @group Land Detector
*/
-PARAM_DEFINE_FLOAT(LAND_MC_THR_MAX, 0.20f);
+PARAM_DEFINE_FLOAT(LNDMC_THR_MAX, 0.20f);
/**
* Fixedwing max horizontal velocity
@@ -84,7 +83,7 @@ PARAM_DEFINE_FLOAT(LAND_MC_THR_MAX, 0.20f);
*
* @group Land Detector
*/
-PARAM_DEFINE_FLOAT(LAND_FW_VEL_XY_MAX, 0.20f);
+PARAM_DEFINE_FLOAT(LNDFW_VEL_XY_MAX, 0.20f);
/**
* Fixedwing max climb rate
@@ -93,7 +92,7 @@ PARAM_DEFINE_FLOAT(LAND_FW_VEL_XY_MAX, 0.20f);
*
* @group Land Detector
*/
-PARAM_DEFINE_FLOAT(LAND_FW_VEL_Z_MAX, 10.00f);
+PARAM_DEFINE_FLOAT(LNDFW_VEL_Z_MAX, 10.00f);
/**
* Airspeed max
@@ -102,4 +101,4 @@ PARAM_DEFINE_FLOAT(LAND_FW_VEL_Z_MAX, 10.00f);
*
* @group Land Detector
*/
-PARAM_DEFINE_FLOAT(LAND_FW_AIRSPEED_MAX, 10.00f);
+PARAM_DEFINE_FLOAT(LNDFW_AIRSPD_MAX, 10.00f);