Browse Source

Add a guard ifdef to catch folks trying to build APM with the wrong board selected.


			
			
				mission-4.1.18
			
			
		
DrZiplok@gmail.com 15 years ago
parent
commit
0f53cc4c8e
  1. 8
      libraries/APM_RC/APM_RC.cpp

8
libraries/APM_RC/APM_RC.cpp

@ -23,6 +23,10 @@ @@ -23,6 +23,10 @@
#include <avr/interrupt.h>
#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) @@ -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;
APM_RC_Class APM_RC;
#endif // defined(ATMega1280)

Loading…
Cancel
Save