aboutsummaryrefslogtreecommitdiff
path: root/src/lib/launchdetection/LaunchMethod.h
diff options
context:
space:
mode:
authorAnton Babushkin <anton.babushkin@me.com>2014-09-28 13:41:21 +0400
committerAnton Babushkin <anton.babushkin@me.com>2014-09-28 13:41:21 +0400
commit1cc5f3778dd6c18f3a14c64959d28f978b0305ef (patch)
treef2b8138e6f85b5f760fa22bbe3aecbce61539277 /src/lib/launchdetection/LaunchMethod.h
parentcf4604f5c3614bc5cd1b82dfee693cbac36181ab (diff)
parent8a18cfa3869555389e7e9ff8f104d83f9c54cb43 (diff)
downloadpx4-firmware-1cc5f3778dd6c18f3a14c64959d28f978b0305ef.tar.gz
px4-firmware-1cc5f3778dd6c18f3a14c64959d28f978b0305ef.tar.bz2
px4-firmware-1cc5f3778dd6c18f3a14c64959d28f978b0305ef.zip
Merge branch 'master' into takeoff_fix
Diffstat (limited to 'src/lib/launchdetection/LaunchMethod.h')
-rw-r--r--src/lib/launchdetection/LaunchMethod.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/lib/launchdetection/LaunchMethod.h b/src/lib/launchdetection/LaunchMethod.h
index e04467f6a..8b5220cb3 100644
--- a/src/lib/launchdetection/LaunchMethod.h
+++ b/src/lib/launchdetection/LaunchMethod.h
@@ -44,13 +44,27 @@
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;
+ /* Returns a upper pitch limit if required, otherwise returns pitchMaxDefault */
+ virtual float getPitchMax(float pitchMaxDefault) = 0;
+
protected:
private:
};