Skip to content

Commit

Permalink
camera feedback: fix camera_trigger subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielePettenuzzo committed Sep 21, 2018
1 parent c96e619 commit 2b3b0eb
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/modules/camera_feedback/camera_feedback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,12 @@ CameraFeedback::task_main()
/* trigger subscription updated */
if (fds[0].revents & POLLIN) {

orb_copy(ORB_ID(camera_trigger), _trigger_sub, &trig);
if (!_camera_capture_feedback) {
orb_copy(ORB_ID(camera_trigger), _trigger_sub, &trig);

} else {
orb_copy(ORB_ID(camera_trigger_feedback), _trigger_sub, &trig);
}

/* update geotagging subscriptions */
orb_check(_gpos_sub, &updated);
Expand Down Expand Up @@ -208,8 +213,14 @@ CameraFeedback::task_main()

capture.q[3] = att.q[3];

// Indicate that no capture feedback from camera is available
capture.result = -1;
// Indicate that whether capture feedback from camera is available
// What is case 0 for capture.result?
if (!_camera_capture_feedback) {
capture.result = -1;

} else {
capture.result = 1;
}

int instance_id;

Expand Down

0 comments on commit 2b3b0eb

Please sign in to comment.