Copter: remove support for CLI Slider

This commit is contained in:
Randy Mackay 2013-03-18 14:07:04 +09:00
parent 597a4b912a
commit 36834e77b5
4 changed files with 1 additions and 50 deletions

View File

@ -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

View File

@ -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)

View File

@ -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
*/

View File

@ -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)