From 40459653b5e007e58172f2f4b3991a7ed6751ec9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 13 Nov 2011 20:19:07 +1100 Subject: [PATCH] purple: fixed LED and IO pin defintitions --- ArduPlane/config.h | 21 +++++++++++++++++++++ ArduPlane/defines.h | 8 -------- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/ArduPlane/config.h b/ArduPlane/config.h index 8524e0557f..a439439af1 100644 --- a/ArduPlane/config.h +++ b/ArduPlane/config.h @@ -62,6 +62,27 @@ # define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN #endif +// LED and IO Pins +// +#if CONFIG_APM_HARDWARE == APM_HARDWARE_APM1 +# define A_LED_PIN 37 +# define B_LED_PIN 36 +# define C_LED_PIN 35 +# define LED_ON HIGH +# define LED_OFF LOW +# define SLIDE_SWITCH_PIN 40 +# define PUSHBUTTON_PIN 41 +#elif CONFIG_APM_HARDWARE == APM_HARDWARE_PURPLE +# define A_LED_PIN 27 +# define B_LED_PIN 26 +# 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 +#endif + ////////////////////////////////////////////////////////////////////////////// // AIRSPEED_SENSOR // AIRSPEED_RATIO diff --git a/ArduPlane/defines.h b/ArduPlane/defines.h index fe75e53596..2367e6f3e9 100644 --- a/ArduPlane/defines.h +++ b/ArduPlane/defines.h @@ -204,14 +204,6 @@ enum gcs_severity { #define AN4 4 #define AN5 5 -// Hardware Parameters -#define SLIDE_SWITCH_PIN 40 -#define PUSHBUTTON_PIN 41 - -#define A_LED_PIN 37 //36 = B, 37 = A, 35 = C -#define B_LED_PIN 36 -#define C_LED_PIN 35 - #define SPEEDFILT 400 // centimeters/second; the speed below which a groundstart will be triggered