AP_RSSI: add and use AP_RSSI_ENABLED

This commit is contained in:
Peter Barker 2023-12-08 13:02:40 +11:00 committed by Andrew Tridgell
parent b2a12f406f
commit b7710a78d8
3 changed files with 19 additions and 0 deletions

View File

@ -13,6 +13,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "AP_RSSI_config.h"
#if AP_RSSI_ENABLED
#include <AP_RSSI/AP_RSSI.h>
#include <GCS_MAVLink/GCS.h>
#include <RC_Channel/RC_Channel.h>
@ -272,3 +276,5 @@ AP_RSSI *rssi()
}
};
#endif // AP_RSSI_ENABLED

View File

@ -14,6 +14,10 @@
*/
#pragma once
#include "AP_RSSI_config.h"
#if AP_RSSI_ENABLED
#include <AP_HAL/AP_HAL.h>
#include <AP_Param/AP_Param.h>
#include <AP_Math/AP_Math.h>
@ -102,3 +106,5 @@ private:
namespace AP {
AP_RSSI *rssi();
};
#endif // AP_RSSI_ENABLED

View File

@ -0,0 +1,7 @@
#pragma once
#include <AP_HAL/AP_HAL_Boards.h>
#ifndef AP_RSSI_ENABLED
#define AP_RSSI_ENABLED 1
#endif