mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-03 03:41:35 +08:00
use multi subscribe to get topics for sdlog
This commit is contained in:
@@ -861,7 +861,7 @@ bool copy_if_updated_multi(orb_id_t topic, int multi_instance, int *handle, void
|
|||||||
|
|
||||||
if (*handle < 0) {
|
if (*handle < 0) {
|
||||||
if (OK == orb_exists(topic, multi_instance)) {
|
if (OK == orb_exists(topic, multi_instance)) {
|
||||||
*handle = orb_subscribe(topic);
|
*handle = orb_subscribe_multi(topic, multi_instance);
|
||||||
/* copy first data */
|
/* copy first data */
|
||||||
if (*handle >= 0) {
|
if (*handle >= 0) {
|
||||||
orb_copy(topic, *handle, buffer);
|
orb_copy(topic, *handle, buffer);
|
||||||
|
|||||||
Reference in New Issue
Block a user