Skip to content

Commit

Permalink
ArduPlane: add and use AP_CAMERA_ENABLED
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Sep 21, 2022
1 parent fd28991 commit dabf78c
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion ArduPlane/ArduPlane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const AP_Scheduler::Task Plane::scheduler_tasks[] = {
#if HAL_MOUNT_ENABLED
SCHED_TASK_CLASS(AP_Mount, &plane.camera_mount, update, 50, 100, 105),
#endif // HAL_MOUNT_ENABLED
#if CAMERA == ENABLED
#if AP_CAMERA_ENABLED
SCHED_TASK_CLASS(AP_Camera, &plane.camera, update, 50, 100, 108),
#endif // CAMERA == ENABLED
SCHED_TASK_CLASS(AP_Scheduler, &plane.scheduler, update_logging, 0.2, 100, 111),
Expand Down
2 changes: 1 addition & 1 deletion ArduPlane/Parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ const AP_Param::Info Plane::var_info[] = {
// @Path: ../libraries/AP_GPS/AP_GPS.cpp
GOBJECT(gps, "GPS", AP_GPS),

#if CAMERA == ENABLED
#if AP_CAMERA_ENABLED
// @Group: CAM_
// @Path: ../libraries/AP_Camera/AP_Camera.cpp
GOBJECT(camera, "CAM_", AP_Camera),
Expand Down
2 changes: 1 addition & 1 deletion ArduPlane/Plane.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ class Plane : public AP_Vehicle {
AP_Navigation *nav_controller = &L1_controller;

// Camera
#if CAMERA == ENABLED
#if AP_CAMERA_ENABLED
AP_Camera camera{MASK_LOG_CAMERA};
#endif

Expand Down
7 changes: 0 additions & 7 deletions ArduPlane/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,6 @@
#define DSPOILR_RUD_RATE_DEFAULT 100
#endif

//////////////////////////////////////////////////////////////////////////////
// CAMERA TRIGGER AND CONTROL
//
#ifndef CAMERA
# define CAMERA ENABLED
#endif

//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
// FLIGHT AND NAVIGATION CONTROL
Expand Down
2 changes: 1 addition & 1 deletion ArduPlane/mode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ bool Mode::enter()
plane.guided_state.last_target_alt = 0;
#endif

#if CAMERA == ENABLED
#if AP_CAMERA_ENABLED
plane.camera.set_is_auto_mode(this == &plane.mode_auto);
#endif

Expand Down

0 comments on commit dabf78c

Please sign in to comment.