Copter: allow ADSB to be disabled

This commit is contained in:
Randy Mackay 2015-11-27 13:53:08 +09:00
parent 34d6d985e9
commit 4ef53427f2
5 changed files with 14 additions and 0 deletions

View File

@ -34,6 +34,7 @@
//#define NAV_GUIDED DISABLED // disable external navigation computer ability to control vehicle through MAV_CMD_NAV_GUIDED mission commands
//#define OPTFLOW DISABLED // disable optical flow sensor to save 5K of flash space
//#define FRSKY_TELEM_ENABLED DISABLED // disable FRSky telemetry
//#define ADSB_ENABLED DISABLED // disable ADSB support
// features below are disabled by default on all boards
//#define SPRAYER ENABLED // enable the crop sprayer feature (two ESC controlled pumps the speed of which depends upon the vehicle's horizontal velocity)

View File

@ -140,7 +140,9 @@ const AP_Scheduler::Task Copter::scheduler_tasks[] = {
SCHED_TASK(read_receiver_rssi, 40, 75),
SCHED_TASK(rpm_update, 40, 200),
SCHED_TASK(compass_cal_update, 4, 100),
#if ADSB_ENABLED == ENABLED
SCHED_TASK(adsb_update, 400, 100),
#endif
#if FRSKY_TELEM_ENABLED == ENABLED
SCHED_TASK(frsky_telemetry_send, 80, 75),
#endif

View File

@ -1934,7 +1934,9 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg)
}
case MAVLINK_MSG_ID_ADSB_VEHICLE:
#if ADSB_ENABLED == ENABLED
copter.adsb.update_vehicle(msg);
#endif
break;
} // end switch

View File

@ -19,6 +19,8 @@
#include "Copter.h"
#if ADSB_ENABLED == ENABLED
/*
* this module deals with ADS-B handling for ArduPilot
* ADS-B is an RF based collision avoidance protocol to tell nearby aircraft your location
@ -42,3 +44,4 @@ void Copter::adsb_handle_vehicle_threats(void)
{
}
#endif // #ADSB_ENABLED

View File

@ -342,6 +342,12 @@
# define PARACHUTE ENABLED
#endif
//////////////////////////////////////////////////////////////////////////////
// ADSB support
#ifndef ADSB_ENABLED
# define ADSB_ENABLED ENABLED
#endif
//////////////////////////////////////////////////////////////////////////////
// Nav-Guided - allows external nav computer to control vehicle
#ifndef NAV_GUIDED