From 36834e77b5d534a8e239c0b2a1a3dd84c40deee9 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Mon, 18 Mar 2013 14:07:04 +0900 Subject: [PATCH] Copter: remove support for CLI Slider --- ArduCopter/config.h | 15 --------------- ArduCopter/options.cmake | 4 ---- ArduCopter/system.pde | 28 +--------------------------- ArduPlane/options.cmake | 4 ---- 4 files changed, 1 insertion(+), 50 deletions(-) diff --git a/ArduCopter/config.h b/ArduCopter/config.h index 0012a48fa5..1fc9b17058 100644 --- a/ArduCopter/config.h +++ b/ArduCopter/config.h @@ -167,10 +167,8 @@ # define C_LED_PIN 35 # define LED_ON HIGH # define LED_OFF LOW - # define SLIDE_SWITCH_PIN 40 # define PUSHBUTTON_PIN 41 # define USB_MUX_PIN -1 - # define CLI_SLIDER_ENABLED DISABLED # define BATTERY_VOLT_PIN 0 // Battery voltage on A0 # define BATTERY_CURR_PIN 1 // Battery current on A1 #elif CONFIG_HAL_BOARD == HAL_BOARD_APM2 @@ -179,9 +177,7 @@ # define C_LED_PIN 25 # define LED_ON LOW # define LED_OFF HIGH - # define SLIDE_SWITCH_PIN (-1) # define PUSHBUTTON_PIN (-1) - # define CLI_SLIDER_ENABLED DISABLED # define USB_MUX_PIN 23 # define BATTERY_VOLT_PIN 1 // Battery voltage on A1 # define BATTERY_CURR_PIN 2 // Battery current on A2 @@ -191,9 +187,7 @@ # define C_LED_PIN 25 # define LED_ON LOW # define LED_OFF HIGH - # define SLIDE_SWITCH_PIN (-1) # define PUSHBUTTON_PIN (-1) - # define CLI_SLIDER_ENABLED DISABLED # define USB_MUX_PIN -1 # define BATTERY_VOLT_PIN 1 // Battery voltage on A1 # define BATTERY_CURR_PIN 2 // Battery current on A2 @@ -203,9 +197,7 @@ # define C_LED_PIN 25 # define LED_ON LOW # define LED_OFF HIGH - # define SLIDE_SWITCH_PIN (-1) # define PUSHBUTTON_PIN (-1) - # define CLI_SLIDER_ENABLED DISABLED # define USB_MUX_PIN -1 # define BATTERY_VOLT_PIN -1 # define BATTERY_CURR_PIN -1 @@ -216,9 +208,7 @@ # define C_LED_PIN 25 # define LED_ON LOW # define LED_OFF HIGH - # define SLIDE_SWITCH_PIN (-1) # define PUSHBUTTON_PIN (-1) - # define CLI_SLIDER_ENABLED DISABLED # define USB_MUX_PIN -1 # define BATTERY_VOLT_PIN -1 # define BATTERY_CURR_PIN -1 @@ -1233,11 +1223,6 @@ # endif #endif -// use this to disable the CLI slider switch -#ifndef CLI_SLIDER_ENABLED - # define CLI_SLIDER_ENABLED DISABLED -#endif - // experimental mpu6000 DMP code #ifndef DMP_ENABLED # define DMP_ENABLED DISABLED diff --git a/ArduCopter/options.cmake b/ArduCopter/options.cmake index 6261b4638a..3182418bd7 100644 --- a/ArduCopter/options.cmake +++ b/ArduCopter/options.cmake @@ -30,10 +30,6 @@ apm_option("APM_PROCESSOR" TYPE STRING DEFAULT "mega2560" OPTIONS "mega" "mega2560") -#apm_option("CLI_SLIDER_ENABLED" TYPE BOOL - #DESCRIPTION "Enable command line interface switch?" - #DEFAULT OFF) - apm_option("LOGGING_ENABLED" TYPE BOOL DESCRIPTION "Enable logging?" DEFAULT OFF) diff --git a/ArduCopter/system.pde b/ArduCopter/system.pde index b3159b9c97..d960f20141 100644 --- a/ArduCopter/system.pde +++ b/ArduCopter/system.pde @@ -127,13 +127,6 @@ static void init_ardupilot() pinMode(C_LED_PIN, OUTPUT); // GPS status LED digitalWrite(C_LED_PIN, LED_OFF); -#if SLIDE_SWITCH_PIN > 0 - pinMode(SLIDE_SWITCH_PIN, INPUT); // To enter interactive mode -#endif -#if CONFIG_PUSHBUTTON == ENABLED - pinMode(PUSHBUTTON_PIN, INPUT); // unused -#endif - relay.init(); #if COPTER_LEDS == ENABLED @@ -237,19 +230,7 @@ static void init_ardupilot() USERHOOK_INIT #endif -#if CLI_ENABLED == ENABLED && CLI_SLIDER_ENABLED == ENABLED - // If the switch is in 'menu' mode, run the main menu. - // - // Since we can't be sure that the setup or test mode won't leave - // the system in an odd state, we don't let the user exit the top - // menu; they must reset in order to fly. - // - if (check_startup_for_CLI()) { - digitalWrite(A_LED_PIN, LED_ON); // turn on setup-mode LED - cliSerial->printf_P(PSTR("\nCLI:\n\n")); - run_cli(cliSerial); - } -#else +#if CLI_ENABLED == ENABLED const prog_char_t *msg = PSTR("\nPress ENTER 3 times to start interactive setup\n"); cliSerial->println_P(msg); #if USB_MUX_PIN == 0 @@ -558,13 +539,6 @@ init_simple_bearing() } } -#if CLI_SLIDER_ENABLED == ENABLED && CLI_ENABLED == ENABLED -static bool check_startup_for_CLI() -{ - return (digitalReadFast(SLIDE_SWITCH_PIN) == 0); -} -#endif // CLI_ENABLED - /* * map from a 8 bit EEPROM baud rate to a real baud rate */ diff --git a/ArduPlane/options.cmake b/ArduPlane/options.cmake index 298327a670..2b1752540f 100644 --- a/ArduPlane/options.cmake +++ b/ArduPlane/options.cmake @@ -30,10 +30,6 @@ apm_option("APM_PROCESSOR" TYPE STRING DEFAULT "mega2560" OPTIONS "mega" "mega2560") -#apm_option("CLI_SLIDER_ENABLED" TYPE BOOL - #DESCRIPTION "Enable command line interface switch?" - #DEFAULT OFF) - apm_option("LOGGING_ENABLED" TYPE BOOL DESCRIPTION "Enable logging?" DEFAULT OFF)