From 922dff05142dbc2a7cd098c5757e014eae9d8e8f Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Thu, 30 Jan 2014 17:40:55 +0900 Subject: [PATCH] Copter: integrate heli_control_stabilize --- ArduCopter/ArduCopter.pde | 6 +++++- ArduCopter/system.pde | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ArduCopter/ArduCopter.pde b/ArduCopter/ArduCopter.pde index ab5abb4977..c3e3787be7 100644 --- a/ArduCopter/ArduCopter.pde +++ b/ArduCopter/ArduCopter.pde @@ -1452,7 +1452,11 @@ static void update_flight_mode() break; case STABILIZE: - stabilize_run(); + #if FRAME_CONFIG == HELI_FRAME + heli_stabilize_run(); + #else + stabilize_run(); + #endif break; case ALT_HOLD: diff --git a/ArduCopter/system.pde b/ArduCopter/system.pde index ac50ea2772..0ebcc56920 100644 --- a/ArduCopter/system.pde +++ b/ArduCopter/system.pde @@ -391,7 +391,11 @@ static bool set_mode(uint8_t mode) break; case STABILIZE: - success = stabilize_init(ignore_checks); + #if FRAME_CONFIG == HELI_FRAME + success = heli_stabilize_init(ignore_checks); + #else + success = stabilize_init(ignore_checks); + #endif break; case ALT_HOLD: