AP_Camera: add and use AP_CAMERA_ENABLED

This commit is contained in:
Peter Barker 2022-06-02 18:28:26 +10:00 committed by Peter Barker
parent d48fc99c5f
commit a18c87a120
4 changed files with 23 additions and 1 deletions

View File

@ -1,5 +1,7 @@
#include "AP_Camera.h"
#if AP_CAMERA_ENABLED
#include <AP_AHRS/AP_AHRS.h>
#include <AP_Relay/AP_Relay.h>
#include <AP_Math/AP_Math.h>
@ -564,3 +566,5 @@ AP_Camera *camera()
}
}
#endif

View File

@ -2,6 +2,10 @@
/// @brief Photo or video camera manager, with EEPROM-backed storage of constants.
#pragma once
#include "AP_Camera_config.h"
#if AP_CAMERA_ENABLED
#include <AP_Common/Location.h>
#include <AP_Logger/LogStructure.h>
#include <AP_Param/AP_Param.h>
@ -162,3 +166,5 @@ private:
namespace AP {
AP_Camera *camera();
};
#endif

View File

@ -1,4 +1,7 @@
#include "AP_Camera.h"
#if AP_CAMERA_ENABLED
#include <AP_Logger/AP_Logger.h>
// Write a Camera packet
@ -53,4 +56,6 @@ void AP_Camera::Write_Camera(uint64_t timestamp_us)
void AP_Camera::Write_Trigger(void)
{
Write_CameraInfo(LOG_TRIGGER_MSG, 0);
}
}
#endif

View File

@ -0,0 +1,7 @@
#pragma once
#include <AP_BoardConfig/AP_BoardConfig.h>
#ifndef AP_CAMERA_ENABLED
#define AP_CAMERA_ENABLED 1
#endif