ArduCopter: Removed CONFIG_SONAR_SOURCE, SONAR_SOURCE_ADC, and SONAR_SOURCE_ANALOG_PIN since no longer used

This commit is contained in:
akdslr 2014-07-18 01:06:09 -04:00 committed by Andrew Tridgell
parent 06fa2e3f60
commit dc67058771
2 changed files with 0 additions and 41 deletions

View File

@ -82,21 +82,8 @@
#define MAGNETOMETER ENABLED
#if CONFIG_HAL_BOARD == HAL_BOARD_APM2
# define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN
# define PARACHUTE DISABLED
# define AC_RALLY DISABLED
#elif CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL
# define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN
#elif CONFIG_HAL_BOARD == HAL_BOARD_PX4
# define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN
#elif CONFIG_HAL_BOARD == HAL_BOARD_FLYMAPLE
# define CONFIG_ADC DISABLED
# define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN
#elif CONFIG_HAL_BOARD == HAL_BOARD_LINUX
# define CONFIG_ADC DISABLED
# define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN
#elif CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN
# define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN
#endif
#if HAL_CPU_CLASS < HAL_CPU_CLASS_75 || CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL
@ -192,30 +179,6 @@
// Sonar
//
#ifndef CONFIG_SONAR_SOURCE
# define CONFIG_SONAR_SOURCE SONAR_SOURCE_ADC
#endif
#if CONFIG_SONAR_SOURCE == SONAR_SOURCE_ADC && CONFIG_ADC == DISABLED
# warning Cannot use ADC for CONFIG_SONAR_SOURCE, becaude CONFIG_ADC is DISABLED
# warning Defaulting CONFIG_SONAR_SOURCE to ANALOG_PIN
# undef CONFIG_SONAR_SOURCE
# define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN
#endif
#if CONFIG_SONAR_SOURCE == SONAR_SOURCE_ADC
# ifndef CONFIG_SONAR_SOURCE_ADC_CHANNEL
# define CONFIG_SONAR_SOURCE_ADC_CHANNEL 7
# endif
#elif CONFIG_SONAR_SOURCE == SONAR_SOURCE_ANALOG_PIN
# ifndef CONFIG_SONAR_SOURCE_ANALOG_PIN
# define CONFIG_SONAR_SOURCE_ANALOG_PIN 0
# endif
#else
# warning Invalid value for CONFIG_SONAR_SOURCE, disabling sonar
# define CONFIG_SONAR DISABLED
#endif
#ifndef CONFIG_SONAR
# define CONFIG_SONAR ENABLED
#endif

View File

@ -22,10 +22,6 @@
#define AUTO_YAW_LOOK_AHEAD 4 // point in the direction the copter is moving
#define AUTO_YAW_RESETTOARMEDYAW 5 // point towards heading at time motors were armed
// sonar - for use with CONFIG_SONAR_SOURCE
#define SONAR_SOURCE_ADC 1
#define SONAR_SOURCE_ANALOG_PIN 2
// Ch6, Ch7 and Ch8 aux switch control
#define AUX_SWITCH_PWM_TRIGGER_HIGH 1800 // pwm value above which the ch7 or ch8 option will be invoked
#define AUX_SWITCH_PWM_TRIGGER_LOW 1200 // pwm value below which the ch7 or ch8 option will be disabled