aboutsummaryrefslogtreecommitdiff
path: root/src/lib/launchdetection/LaunchMethod.h
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2014-09-03 00:29:33 +0200
committerThomas Gubler <thomasgubler@gmail.com>2014-09-03 00:29:33 +0200
commit6188678f7755afc4ef6dc4299f1b4b5b6e1b29f2 (patch)
treed5f3dc5eeccea42298081fe7a366262677ed9a09 /src/lib/launchdetection/LaunchMethod.h
parent2780dc39ce5d47f2d9dfa921062100a1dc86c2be (diff)
parentc591444c1e2e4124d28a03653c0ccdbcd305c1c2 (diff)
downloadpx4-firmware-6188678f7755afc4ef6dc4299f1b4b5b6e1b29f2.tar.gz
px4-firmware-6188678f7755afc4ef6dc4299f1b4b5b6e1b29f2.tar.bz2
px4-firmware-6188678f7755afc4ef6dc4299f1b4b5b6e1b29f2.zip
Merge pull request #1303 from PX4/launchdetectionstates
Launchdetection improvements
Diffstat (limited to 'src/lib/launchdetection/LaunchMethod.h')
-rw-r--r--src/lib/launchdetection/LaunchMethod.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/launchdetection/LaunchMethod.h b/src/lib/launchdetection/LaunchMethod.h
index e04467f6a..d2f091cea 100644
--- a/src/lib/launchdetection/LaunchMethod.h
+++ b/src/lib/launchdetection/LaunchMethod.h
@@ -44,11 +44,22 @@
namespace launchdetection
{
+enum LaunchDetectionResult {
+ LAUNCHDETECTION_RES_NONE = 0, /**< No launch has been detected */
+ LAUNCHDETECTION_RES_DETECTED_ENABLECONTROL = 1, /**< Launch has been detected, the controller should
+ control the attitude. However any motors should not throttle
+ up and still be set to 'throttlePreTakeoff'.
+ For instance this is used to have a delay for the motor
+ when launching a fixed wing aircraft from a bungee */
+ LAUNCHDETECTION_RES_DETECTED_ENABLEMOTORS = 2 /**< Launch has been detected, teh controller should control
+ attitude and also throttle up the motors. */
+};
+
class LaunchMethod
{
public:
virtual void update(float accel_x) = 0;
- virtual bool getLaunchDetected() = 0;
+ virtual LaunchDetectionResult getLaunchDetected() const = 0;
virtual void reset() = 0;
protected: