purple: add the remaining hw defines for purple hardware

This commit is contained in:
Andrew Tridgell 2011-11-13 19:47:35 +11:00 committed by Pat Hickey
parent 41caa949ca
commit ca76f6d0ec
2 changed files with 18 additions and 5 deletions

View File

@ -48,10 +48,18 @@
#ifndef CONFIG_APM_HARDWARE
# define CONFIG_APM_HARDWARE APM_HARDWARE_APM1
#else
# if CONFIG_APM_HARDWARE == APM_HARDWARE_PURPLE
# define CONFIG_IMU_TYPE CONFIG_IMU_MPU6000
# endif
#endif
//////////////////////////////////////////////////////////////////////////////
// PURPLE HARDWARE DEFAULTS
//
#if CONFIG_APM_HARDWARE == APM_HARDWARE_PURPLE
# define CONFIG_IMU_TYPE CONFIG_IMU_MPU6000
# define CONFIG_PUSHBUTTON DISABLED
# define CONFIG_RELAY DISABLED
# define MAG_ORIENTATION ROTATION_NONE
# define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN
#endif
//////////////////////////////////////////////////////////////////////////////

View File

@ -197,10 +197,15 @@ static void init_ardupilot()
pinMode(C_LED_PIN, OUTPUT); // GPS status LED
pinMode(A_LED_PIN, OUTPUT); // GPS status LED
pinMode(B_LED_PIN, OUTPUT); // GPS status LED
#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
#if CONFIG_RELAY == ENABLED
DDRL |= B00000100; // Set Port L, pin 2 to output for the relay
#endif
// 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