Skip to content

Commit

Permalink
camera_capture: refactor to simplify capture channel initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
MaEtUgR committed Dec 12, 2024
1 parent a5f81a1 commit 375cd55
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions src/drivers/camera_capture/camera_capture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ CameraCapture::CameraCapture() :
_p_camera_capture_edge = param_find("CAM_CAP_EDGE");
param_get(_p_camera_capture_edge, &_camera_capture_edge);

// get the capture channel from function configuration params
_capture_channel = -1;

for (unsigned i = 0; i < 16 && _capture_channel == -1; ++i) {
char param_name[17];
snprintf(param_name, sizeof(param_name), "%s_%s%d", PARAM_PREFIX, "FUNC", i + 1);
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/camera_capture/camera_capture.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class CameraCapture : public px4::ScheduledWorkItem
static struct work_s _work_publisher;

private:
int _capture_channel = 5; ///< by default, use FMU output 6
int _capture_channel{-1};

// Publishers
uORB::Publication<vehicle_command_ack_s> _command_ack_pub{ORB_ID(vehicle_command_ack)};
Expand Down

0 comments on commit 375cd55

Please sign in to comment.