AP_Camera: add and use AP_CAMERA_ENABLED
This commit is contained in:
parent
d48fc99c5f
commit
a18c87a120
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
7
libraries/AP_Camera/AP_Camera_config.h
Normal file
7
libraries/AP_Camera/AP_Camera_config.h
Normal file
@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <AP_BoardConfig/AP_BoardConfig.h>
|
||||
|
||||
#ifndef AP_CAMERA_ENABLED
|
||||
#define AP_CAMERA_ENABLED 1
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user