Rover: 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 9b5d70f7b5
commit 71f77fea6e
5 changed files with 4 additions and 11 deletions

View File

@ -300,7 +300,7 @@ const AP_Param::Info Rover::var_info[] = {
// @Path: ../libraries/AP_AHRS/AP_AHRS.cpp
GOBJECT(ahrs, "AHRS_", AP_AHRS),
#if CAMERA == ENABLED
#if AP_CAMERA_ENABLED
// @Group: CAM_
// @Path: ../libraries/AP_Camera/AP_Camera.cpp
GOBJECT(camera, "CAM_", AP_Camera),

View File

@ -104,7 +104,7 @@ const AP_Scheduler::Task Rover::scheduler_tasks[] = {
#if HAL_MOUNT_ENABLED
SCHED_TASK_CLASS(AP_Mount, &rover.camera_mount, update, 50, 200, 75),
#endif
#if CAMERA == ENABLED
#if AP_CAMERA_ENABLED
SCHED_TASK_CLASS(AP_Camera, &rover.camera, update, 50, 200, 78),
#endif
SCHED_TASK(gcs_failsafe_check, 10, 200, 81),

View File

@ -158,7 +158,7 @@ private:
struct Location current_loc;
// Camera
#if CAMERA == ENABLED
#if AP_CAMERA_ENABLED
AP_Camera camera{MASK_LOG_CAMERA};
#endif

View File

@ -31,13 +31,6 @@
#error XXX
#endif
//////////////////////////////////////////////////////////////////////////////
// CAMERA control
//
#ifndef CAMERA
#define CAMERA ENABLED
#endif
//////////////////////////////////////////////////////////////////////////////
// GRIPPER control
//

View File

@ -234,7 +234,7 @@ bool Rover::set_mode(Mode &new_mode, ModeReason reason)
fence.manual_recovery_start();
#endif
#if CAMERA == ENABLED
#if AP_CAMERA_ENABLED
camera.set_is_auto_mode(control_mode->mode_number() == Mode::Number::AUTO);
#endif