mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-06 16:49:51 +08:00
camera_trigger : add support for resetting trigger sequence
This commit is contained in:
committed by
Lorenz Meier
parent
7fcb3b4f93
commit
5fc20bea5d
@@ -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));
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user