mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-01 08:24:07 +08:00
fix: add whitelist on dds em
This commit is contained in:
parent
695e2c7caa
commit
bbd6d9794f
@ -198,7 +198,7 @@ static void on_topic_update(uxrSession *session, uxrObjectId object_id, uint16_t
|
||||
case @(idx)+ (65535U / 32U) + 1: {
|
||||
@(sub['simple_base_type'])_s data;
|
||||
|
||||
@[ if sub['topic_simple'] == 'vehicle_command']@
|
||||
@[ if sub['topic_simple'] in whitelist_topics]@
|
||||
if (ucdr_deserialize_@(sub['simple_base_type'])(*ub, data, time_offset_us)) {
|
||||
//print_message(ORB_ID(@(sub['simple_base_type'])), data);
|
||||
pubs->@(sub['topic_simple'])_pub.publish(data);
|
||||
@ -218,7 +218,7 @@ static void on_topic_update(uxrSession *session, uxrObjectId object_id, uint16_t
|
||||
@(sub['simple_base_type'])_s data;
|
||||
|
||||
@[ if sub.get('route_field')]@
|
||||
@[ if sub['topic_simple'] == 'vehicle_command']@
|
||||
@[ if sub['topic_simple'] in whitelist_topics]@
|
||||
if (ucdr_deserialize_@(sub['simple_base_type'])(*ub, data, time_offset_us)) {
|
||||
//print_message(ORB_ID(@(sub['simple_base_type'])), data);
|
||||
int instance = -1;
|
||||
@ -262,7 +262,7 @@ static void on_topic_update(uxrSession *session, uxrObjectId object_id, uint16_t
|
||||
}
|
||||
@[ end if]@
|
||||
@[ else]@
|
||||
@[ if sub['topic_simple'] == 'vehicle_command']@
|
||||
@[ if sub['topic_simple'] in whitelist_topics]@
|
||||
if (ucdr_deserialize_@(sub['simple_base_type'])(*ub, data, time_offset_us)) {
|
||||
//print_message(ORB_ID(@(sub['simple_base_type'])), data);
|
||||
pubs->@(sub['topic_simple'])_pub.publish(data);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user