ArduCopter: Make the code fit in a 1280 chip again

Even allows to control a camera/antenna mount, if the user explicitly wants to.
This commit is contained in:
Amilcar Lucas 2012-08-06 00:23:48 +02:00
parent 0106c133cf
commit aa3cc63b15
1 changed files with 18 additions and 3 deletions

View File

@ -467,17 +467,26 @@
// CAMERA TRIGGER AND CONTROL // CAMERA TRIGGER AND CONTROL
// //
#ifndef CAMERA #ifndef CAMERA
# if defined( __AVR_ATmega1280__ )
# define CAMERA DISABLED
# else
# define CAMERA ENABLED # define CAMERA ENABLED
# endif # endif
#endif
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// MOUNT (ANTENNA OR CAMERA) // MOUNT (ANTENNA OR CAMERA)
// //
#ifndef MOUNT #ifndef MOUNT
# if defined( __AVR_ATmega1280__ )
# define MOUNT DISABLED
# else
# define MOUNT ENABLED # define MOUNT ENABLED
# endif # endif
#endif
#if defined( __AVR_ATmega1280__ ) && (MOUNT == ENABLED) #if defined( __AVR_ATmega1280__ ) && (MOUNT == ENABLED)
# warning "You choose to enable MOUNT on a small ATmega1280, CLI, CAMERA and AP_LIMITS will be disabled to free some space for it"
// The small ATmega1280 chip does not have enough memory for mount support // The small ATmega1280 chip does not have enough memory for mount support
// so disable CLI, this will allow mount support and other improvements to fit. // so disable CLI, this will allow mount support and other improvements to fit.
@ -496,6 +505,7 @@
// To save some more space // To save some more space
# undef CAMERA # undef CAMERA
# define CAMERA DISABLED # define CAMERA DISABLED
# define AP_LIMITS DISABLED
#endif #endif
@ -1021,8 +1031,13 @@
// use this to completely disable the CLI // use this to completely disable the CLI
#ifndef CLI_ENABLED #ifndef CLI_ENABLED
// Sorry the chip is just too small to let this fit
# if defined( __AVR_ATmega1280__ )
# define CLI_ENABLED DISABLED
# else
# define CLI_ENABLED ENABLED # define CLI_ENABLED ENABLED
# endif # endif
#endif
// use this to disable the CLI slider switch // use this to disable the CLI slider switch
#ifndef CLI_SLIDER_ENABLED #ifndef CLI_SLIDER_ENABLED