mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 11:38:56 +08:00
camera_capture: refactor to simplify capture channel initialization
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -96,7 +96,7 @@ public:
|
||||
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)};
|
||||
|
||||
Reference in New Issue
Block a user