mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 21:03:35 +08:00
camera_trigger : switch to queued publisher
This commit is contained in:
committed by
Lorenz Meier
parent
b5ce55bab6
commit
3ba0275952
@@ -1,3 +1,4 @@
|
|||||||
|
uint32 seq # Image sequence number
|
||||||
|
|
||||||
uint32 seq # Image sequence
|
uint32 ORB_QUEUE_LENGTH = 3
|
||||||
|
|
||||||
|
|||||||
@@ -631,8 +631,14 @@ CameraTrigger::engage(void *arg)
|
|||||||
|
|
||||||
report.seq = trig->_trigger_seq++;
|
report.seq = trig->_trigger_seq++;
|
||||||
|
|
||||||
int instance_id = 0;
|
if (trig->_trigger_pub == nullptr) {
|
||||||
orb_publish_auto(ORB_ID(camera_trigger), &trig->_trigger_pub, &report, &instance_id, ORB_PRIO_DEFAULT);
|
trig->_trigger_pub = orb_advertise_queue(ORB_ID(camera_trigger), &report,
|
||||||
|
camera_trigger_s::ORB_QUEUE_LENGTH);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
orb_publish(ORB_ID(camera_trigger), trig->_trigger_pub, &report);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user