Zenoh fix gcc/sitl compile errors

This commit is contained in:
Peter van der Perk
2025-08-22 08:22:59 +02:00
committed by Beat Küng
parent 4aff095f9b
commit 859ba81e33
2 changed files with 9 additions and 2 deletions
+2
View File
@@ -59,6 +59,8 @@ target_compile_options(zenohpico_static PUBLIC -Wno-cast-align
-Wno-stringop-truncation
-Wno-unused-result
-Wno-type-limits
-Wno-unused-variable
-Wno-maybe-uninitialized
-DZ_BATCH_SIZE_RX=512
-DZ_BATCH_SIZE_TX=512)
+7 -2
View File
@@ -98,8 +98,13 @@ void ZENOH::run()
int8_t ret;
int i;
#ifndef BOARD_HAS_NO_UUID
px4_guid_t px4_guid;
board_get_px4_guid(px4_guid);
#else
// TODO Fill ID with something reasonable
px4_guid_t px4_guid = {0xAA, 0xBB, 0xAA};
#endif
Zenoh_Config z_config;
@@ -149,7 +154,7 @@ void ZENOH::run()
if (_zenoh_subscribers[i] != 0) {
const uint8_t *rihs_hash = getRIHS01_Hash(type);
toCamelCase(type); // Convert uORB type to camel case
snprintf(keyexpr, KEYEXPR_SIZE, "%li/%s/"
snprintf(keyexpr, KEYEXPR_SIZE, "%" PRId32 "/%s/"
KEYEXPR_MSG_NAME "%s_/RIHS01_"
"%02x%02x%02x%02x%02x%02x%02x%02x"
"%02x%02x%02x%02x%02x%02x%02x%02x"
@@ -194,7 +199,7 @@ void ZENOH::run()
if (_zenoh_publishers[i] != 0) {
const uint8_t *rihs_hash = getRIHS01_Hash(type);
toCamelCase(type); // Convert uORB type to camel case
snprintf(keyexpr, KEYEXPR_SIZE, "%li/%s/"
snprintf(keyexpr, KEYEXPR_SIZE, "%" PRId32 "/%s/"
KEYEXPR_MSG_NAME "%s_/RIHS01_"
"%02x%02x%02x%02x%02x%02x%02x%02x"
"%02x%02x%02x%02x%02x%02x%02x%02x"