From d2f4fea58ab3954d6996eccce342eb69644f7f71 Mon Sep 17 00:00:00 2001 From: Pat Hickey Date: Sun, 13 Nov 2011 15:03:16 +1100 Subject: [PATCH] remove BROKEN_SLIDER code use the new CLI_SLIDER_ENABLED option and the "hit ENTER 3 times" method --- ArduCopter/APM_Config.h | 2 -- ArduCopter/config.h | 4 ---- ArduCopter/system.pde | 26 +------------------------- 3 files changed, 1 insertion(+), 31 deletions(-) diff --git a/ArduCopter/APM_Config.h b/ArduCopter/APM_Config.h index cc4d481dcf..1838c3bd4f 100644 --- a/ArduCopter/APM_Config.h +++ b/ArduCopter/APM_Config.h @@ -7,8 +7,6 @@ //#define MAG_ORIENTATION AP_COMPASS_COMPONENTS_DOWN_PINS_FORWARD //#define HIL_MODE HIL_MODE_ATTITUDE -//#define BROKEN_SLIDER 0 // 1 = yes (use Yaw to enter CLI mode) - #define FRAME_CONFIG QUAD_FRAME /* options: diff --git a/ArduCopter/config.h b/ArduCopter/config.h index 7da2390aff..2b10094e41 100644 --- a/ArduCopter/config.h +++ b/ArduCopter/config.h @@ -793,10 +793,6 @@ # define CUT_MOTORS 1 // do we cut the motors with no throttle? #endif -#ifndef BROKEN_SLIDER -# define BROKEN_SLIDER 0 // 1 = yes (use Yaw to enter CLI mode) -#endif - #ifndef MOTOR_LEDS # define MOTOR_LEDS 1 // 0 = off, 1 = on #endif diff --git a/ArduCopter/system.pde b/ArduCopter/system.pde index fcfdc46d39..aa1e5d1e11 100644 --- a/ArduCopter/system.pde +++ b/ArduCopter/system.pde @@ -568,36 +568,12 @@ init_throttle_cruise() } } -#if CLI_ENABLED == ENABLED -#if BROKEN_SLIDER == 1 - -static boolean -check_startup_for_CLI() -{ - //return true; - if((g.rc_4.radio_max) < 1600){ - // CLI mode - return true; - - }else if(abs(g.rc_4.control_in) > 3000){ - // CLI mode - return true; - - }else{ - // startup to fly - return false; - } -} - -#else - +#if CLI_SLIDER_ENABLED == ENABLED && CLI_ENABLED == ENABLED static boolean check_startup_for_CLI() { return (digitalRead(SLIDE_SWITCH_PIN) == 0); } - -#endif // BROKEN_SLIDER #endif // CLI_ENABLED /*