AP_ADSB: conditionally compile based on HAL_ADSB_ENABLED

This commit is contained in:
Andy Piper 2020-10-06 04:32:51 -07:00 committed by Andrew Tridgell
parent 150b8653a4
commit af8542b5d6
2 changed files with 11 additions and 0 deletions

View File

@ -22,6 +22,7 @@
#include <AP_HAL/AP_HAL.h>
#include "AP_ADSB.h"
#if HAL_ADSB_ENABLED
#include <GCS_MAVLink/GCS_MAVLink.h>
#include <stdio.h> // for sprintf
#include <limits.h>
@ -967,4 +968,5 @@ AP_ADSB *AP::ADSB()
{
return AP_ADSB::get_singleton();
}
#endif // HAL_ADSB_ENABLED

View File

@ -22,11 +22,18 @@
*/
#include <AP_HAL/AP_HAL.h>
#include <AP_HAL/AP_HAL_Boards.h>
#include <AP_Common/AP_Common.h>
#include <AP_Param/AP_Param.h>
#include <AP_Common/Location.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 {
public:
// constructor
@ -217,3 +224,5 @@ private:
namespace AP {
AP_ADSB *ADSB();
};
#endif // HAL_ADSB_ENABLED