From af9729c1261b096e3cf05581b450b910914a732e Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 3 Jan 2017 14:58:07 +1100 Subject: [PATCH] Plane: correct compilation when parachute disabled --- ArduPlane/Plane.h | 4 +++- ArduPlane/parachute.cpp | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ArduPlane/Plane.h b/ArduPlane/Plane.h index 93f8a610f1..690b7d4bf3 100644 --- a/ArduPlane/Plane.h +++ b/ArduPlane/Plane.h @@ -1092,10 +1092,12 @@ private: void init_capabilities(void); void dataflash_periodic(void); uint16_t throttle_min(void) const; - void do_parachute(const AP_Mission::Mission_Command& cmd); void parachute_check(); +#if PARACHUTE == ENABLED + void do_parachute(const AP_Mission::Mission_Command& cmd); void parachute_release(); bool parachute_manual_release(); +#endif void accel_cal_update(void); void update_soft_armed(); diff --git a/ArduPlane/parachute.cpp b/ArduPlane/parachute.cpp index d1cd8a4fc1..0cbd41c973 100644 --- a/ArduPlane/parachute.cpp +++ b/ArduPlane/parachute.cpp @@ -6,9 +6,13 @@ */ void Plane::parachute_check() { +#if PARACHUTE == ENABLED parachute.update(); +#endif } +#if PARACHUTE == ENABLED + /* parachute_release - trigger the release of the parachute */ @@ -49,3 +53,5 @@ bool Plane::parachute_manual_release() return true; } + +#endif