Camera trigger: Support triggering one image immediately.

This allows to re-enable the distance trigger and immediately take a picture. This is helpful to ensure survey areas are covered on entry and exit.
This commit is contained in:
Lorenz Meier
2017-07-06 22:52:52 +02:00
parent 1a12326d7d
commit 80461fad6b

View File

@@ -602,6 +602,12 @@ CameraTrigger::cycle_trampoline(void *arg)
}
}
// Trigger once immediately if param is set
if (cmd.param3 > 0.0f) {
// Schedule shot
trig->_one_shot = true;
}
cmd_result = vehicle_command_s::VEHICLE_CMD_RESULT_ACCEPTED;
} else if (cmd.command == vehicle_command_s::VEHICLE_CMD_DO_SET_CAM_TRIGG_INTERVAL) {