From 0f53cc4c8e435fdcbaf3b49d44682408a1ef1f0c Mon Sep 17 00:00:00 2001 From: "DrZiplok@gmail.com" Date: Tue, 14 Sep 2010 15:22:08 +0000 Subject: [PATCH] Add a guard ifdef to catch folks trying to build APM with the wrong board selected. git-svn-id: https://arducopter.googlecode.com/svn/trunk@517 f9c3cf11-9bcb-44bc-f272-b75c42450872 --- libraries/APM_RC/APM_RC.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libraries/APM_RC/APM_RC.cpp b/libraries/APM_RC/APM_RC.cpp index 9a85b33425..cda973f31f 100644 --- a/libraries/APM_RC/APM_RC.cpp +++ b/libraries/APM_RC/APM_RC.cpp @@ -23,6 +23,10 @@ #include #include "WProgram.h" +#if !defined(__AVR_ATmega1280__) +# error Please check the Tools/Board menu to ensure you have selected Arduino Mega as your target. +#else + // Variable definition for Input Capture interrupt volatile unsigned int ICR4_old; volatile unsigned char PPM_Counter=0; @@ -184,4 +188,6 @@ void APM_RC_Class::Force_Out6_Out7(void) } // make one instance for the user to use -APM_RC_Class APM_RC; \ No newline at end of file +APM_RC_Class APM_RC; + +#endif // defined(ATMega1280)