AP_VideoTX: add and use AP_VIDEOTX_ENABLED

This commit is contained in:
Peter Barker 2023-01-20 00:00:17 +11:00 committed by Andrew Tridgell
parent a81bce6da4
commit 20f504d337
5 changed files with 32 additions and 11 deletions

View File

@ -15,11 +15,7 @@
#pragma once
#include <AP_HAL/AP_HAL.h>
#ifndef HAL_SMARTAUDIO_ENABLED
#define HAL_SMARTAUDIO_ENABLED !HAL_MINIMIZE_FEATURES
#endif
#include "AP_VideoTX_config.h"
#if HAL_SMARTAUDIO_ENABLED

View File

@ -17,15 +17,12 @@
#pragma once
#include <AP_HAL/AP_HAL.h>
#include <AP_OSD/AP_OSD.h>
#ifndef AP_TRAMP_ENABLED
#define AP_TRAMP_ENABLED OSD_ENABLED && BOARD_FLASH_SIZE>1024 && !HAL_MINIMIZE_FEATURES
#endif
#include "AP_VideoTX_config.h"
#if AP_TRAMP_ENABLED
#include <AP_HAL/AP_HAL.h>
#include <AP_OSD/AP_OSD.h>
#include <AP_Param/AP_Param.h>
#include <AP_HAL/utility/RingBuffer.h>
#include "AP_VideoTX.h"

View File

@ -14,6 +14,9 @@
*/
#include "AP_VideoTX.h"
#if AP_VIDEOTX_ENABLED
#include <AP_RCTelemetry/AP_CRSF_Telem.h>
#include <GCS_MAVLink/GCS.h>
@ -540,3 +543,5 @@ namespace AP {
return *AP_VideoTX::get_singleton();
}
};
#endif

View File

@ -14,6 +14,10 @@
*/
#pragma once
#include "AP_VideoTX_config.h"
#if AP_VIDEOTX_ENABLED
#include <AP_Param/AP_Param.h>
#define VTX_MAX_CHANNELS 8
@ -195,3 +199,5 @@ private:
namespace AP {
AP_VideoTX& vtx();
};
#endif // AP_VIDEOTX_ENABLED

View File

@ -0,0 +1,17 @@
#pragma once
#include <AP_HAL/AP_HAL_Boards.h>
#include <AP_OSD/AP_OSD.h>
#ifndef AP_VIDEOTX_ENABLED
#define AP_VIDEOTX_ENABLED 1
#endif
#ifndef AP_TRAMP_ENABLED
#define AP_TRAMP_ENABLED AP_VIDEOTX_ENABLED && OSD_ENABLED && BOARD_FLASH_SIZE>1024 && !HAL_MINIMIZE_FEATURES
#endif
#ifndef HAL_SMARTAUDIO_ENABLED
#define HAL_SMARTAUDIO_ENABLED AP_VIDEOTX_ENABLED && !HAL_MINIMIZE_FEATURES
#endif