Browse Source

AP_Common: Flymaple compatibility

mission-4.1.18
Mike McCauley 12 years ago committed by Andrew Tridgell
parent
commit
8f61a36e58
  1. 1
      libraries/AP_Common/AP_Common.h
  2. 5
      libraries/AP_Common/c++.cpp

1
libraries/AP_Common/AP_Common.h

@ -123,5 +123,6 @@ struct Location {
#define AP_PRODUCT_ID_APM2_REV_D7 0x57 // APM2 with MPU6000_REV_D7 #define AP_PRODUCT_ID_APM2_REV_D7 0x57 // APM2 with MPU6000_REV_D7
#define AP_PRODUCT_ID_APM2_REV_D8 0x58 // APM2 with MPU6000_REV_D8 #define AP_PRODUCT_ID_APM2_REV_D8 0x58 // APM2 with MPU6000_REV_D8
#define AP_PRODUCT_ID_APM2_REV_D9 0x59 // APM2 with MPU6000_REV_D9 #define AP_PRODUCT_ID_APM2_REV_D9 0x59 // APM2 with MPU6000_REV_D9
#define AP_PRODUCT_ID_FLYMAPLE 0x60 // Flymaple with ITG3205, ADXL345, HMC5883, BMP085
#endif // _AP_COMMON_H #endif // _AP_COMMON_H

5
libraries/AP_Common/c++.cpp

@ -9,7 +9,7 @@
#include <AP_HAL.h> #include <AP_HAL.h>
#include <stdlib.h> #include <stdlib.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_APM1 || CONFIG_HAL_BOARD == HAL_BOARD_APM2 || CONFIG_HAL_BOARD == HAL_BOARD_SMACCM #if CONFIG_HAL_BOARD == HAL_BOARD_APM1 || CONFIG_HAL_BOARD == HAL_BOARD_APM2 || CONFIG_HAL_BOARD == HAL_BOARD_SMACCM || CONFIG_HAL_BOARD == HAL_BOARD_FLYMAPLE
void * operator new(size_t size) void * operator new(size_t size)
{ {
@ -21,9 +21,12 @@ void operator delete(void *p)
if (p) free(p); if (p) free(p);
} }
// Conflicts with libmaple wirish/cxxabi-compat.cpp
#if CONFIG_HAL_BOARD != HAL_BOARD_FLYMAPLE
extern "C" void __cxa_pure_virtual(){ extern "C" void __cxa_pure_virtual(){
while (1){} while (1){}
} }
#endif
void * operator new[](size_t size) void * operator new[](size_t size)
{ {

Loading…
Cancel
Save