mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 08:38:53 +08:00
zenoh: Don't use uORB o_name as type but check for parent type
For example vehicle_local_position_groundtruth has ROS2 type vehicle_local_position, so we've to use px4_msgs/VehicleLocalPosition as typename
This commit is contained in:
committed by
Beat Küng
parent
cb74cee970
commit
e37f20e94d
@@ -159,6 +159,20 @@ Zenoh_Subscriber* genSubscriber(const char *name) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const char* genTypeName(const char *name, const uint8_t* hash) {
|
||||
const char *pch;
|
||||
for (auto &sub : _topics) {
|
||||
pch = strstr(name, sub.orb_meta->o_name);
|
||||
if(pch) {
|
||||
if(hash == sub.hash) {
|
||||
return sub.orb_meta->o_name;
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
const uint8_t* getRIHS01_Hash(const orb_metadata *meta) {
|
||||
for (auto &sub : _topics) {
|
||||
if(sub.orb_meta->o_id == meta->o_id) {
|
||||
|
||||
Reference in New Issue
Block a user