From b01a71c4b9da435d9884501c6153a715495f421a Mon Sep 17 00:00:00 2001 From: Jason Short Date: Sat, 11 Aug 2012 22:31:30 -0700 Subject: [PATCH] ACM: Toy mode updates - added second toy mode --- ArduCopter/ArduCopter.pde | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ArduCopter/ArduCopter.pde b/ArduCopter/ArduCopter.pde index 8d427b97d7..f401a0871f 100644 --- a/ArduCopter/ArduCopter.pde +++ b/ArduCopter/ArduCopter.pde @@ -359,7 +359,8 @@ static const char* flight_mode_strings[] = { "POSITION", // 8 "LAND", // 9 "OF_LOITER", // 10 - "TOY"}; // 11 THOR Added for additional Fligt mode + "TOY_M", // 11 + "TOY_A"}; // 12 THOR Added for additional Fligt mode /* Radio values Channel assignments @@ -676,6 +677,7 @@ static int16_t baro_rate; static int8_t reset_throttle_counter; // used to track when to read sensors vs estimate alt static boolean alt_sensor_flag; +static int16_t saved_toy_throttle; //////////////////////////////////////////////////////////////////////////////// @@ -1142,7 +1144,7 @@ static void medium_loop() case 2: medium_loopCounter++; - if(control_mode == TOY){ + if(control_mode == TOY_A){ update_toy_throttle(); if(throttle_mode == THROTTLE_AUTO){ @@ -1987,14 +1989,11 @@ static void update_navigation() break; case STABILIZE: + case TOY_A: + case TOY_M: wp_control = NO_NAV_MODE; update_nav_wp(); break; - - // THOR added to enable Virtual WP nav - case TOY: - update_nav_wp(); - break; } // are we in SIMPLE mode?