AP_ADSB: conditionally compile based on HAL_ADSB_ENABLED
This commit is contained in:
parent
150b8653a4
commit
af8542b5d6
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include <AP_HAL/AP_HAL.h>
|
#include <AP_HAL/AP_HAL.h>
|
||||||
#include "AP_ADSB.h"
|
#include "AP_ADSB.h"
|
||||||
|
#if HAL_ADSB_ENABLED
|
||||||
#include <GCS_MAVLink/GCS_MAVLink.h>
|
#include <GCS_MAVLink/GCS_MAVLink.h>
|
||||||
#include <stdio.h> // for sprintf
|
#include <stdio.h> // for sprintf
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
@ -967,4 +968,5 @@ AP_ADSB *AP::ADSB()
|
|||||||
{
|
{
|
||||||
return AP_ADSB::get_singleton();
|
return AP_ADSB::get_singleton();
|
||||||
}
|
}
|
||||||
|
#endif // HAL_ADSB_ENABLED
|
||||||
|
|
||||||
|
@ -22,11 +22,18 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <AP_HAL/AP_HAL.h>
|
#include <AP_HAL/AP_HAL.h>
|
||||||
|
#include <AP_HAL/AP_HAL_Boards.h>
|
||||||
#include <AP_Common/AP_Common.h>
|
#include <AP_Common/AP_Common.h>
|
||||||
#include <AP_Param/AP_Param.h>
|
#include <AP_Param/AP_Param.h>
|
||||||
#include <AP_Common/Location.h>
|
#include <AP_Common/Location.h>
|
||||||
#include <GCS_MAVLink/GCS_MAVLink.h>
|
#include <GCS_MAVLink/GCS_MAVLink.h>
|
||||||
|
|
||||||
|
#ifndef HAL_ADSB_ENABLED
|
||||||
|
#define HAL_ADSB_ENABLED !HAL_MINIMIZE_FEATURES && BOARD_FLASH_SIZE > 1024
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if HAL_ADSB_ENABLED
|
||||||
|
|
||||||
class AP_ADSB {
|
class AP_ADSB {
|
||||||
public:
|
public:
|
||||||
// constructor
|
// constructor
|
||||||
@ -217,3 +224,5 @@ private:
|
|||||||
namespace AP {
|
namespace AP {
|
||||||
AP_ADSB *ADSB();
|
AP_ADSB *ADSB();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif // HAL_ADSB_ENABLED
|
||||||
|
Loading…
Reference in New Issue
Block a user