Skip to content

Commit

Permalink
camera_trigger : add support for resetting trigger sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
mhkabir committed Apr 13, 2017
1 parent c793495 commit c2014eb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/drivers/camera_trigger/camera_trigger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,14 @@ CameraTrigger::cycle_trampoline(void *arg)

need_ack = true;

if (cmd.param3 > 0.0f) {
// reset trigger sequence
trig->_trigger_seq = 0;

}

// Set trigger rate from command
if (cmd.param2 > 0) {
if (cmd.param2 > 0.0f) {
trig->_interval = cmd.param2;
param_set(trig->_p_interval, &(trig->_interval));
}
Expand Down Expand Up @@ -571,7 +577,6 @@ CameraTrigger::cycle_trampoline(void *arg)

// Send ACKs for trigger commands
if (updated && need_ack) {

vehicle_command_ack_s command_ack = {};

command_ack.command = cmd.command;
Expand Down

0 comments on commit c2014eb

Please sign in to comment.