AP_DDS: use msg_prefix in GCS_SEND_TEXT

Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
This commit is contained in:
Rhys Mainwaring 2024-01-29 13:37:45 +00:00 committed by Andrew Tridgell
parent 84e4a94ae7
commit dac291c762
1 changed files with 5 additions and 5 deletions

View File

@ -648,7 +648,7 @@ void AP_DDS_Client::main_loop(void)
//! @todo check for request to stop task
while (true) {
if (comm == nullptr) {
GCS_SEND_TEXT(MAV_SEVERITY_ERROR, "DDS Client: transport invalid, exiting");
GCS_SEND_TEXT(MAV_SEVERITY_ERROR, "%s transport invalid, exiting", msg_prefix);
return;
}
@ -656,17 +656,17 @@ void AP_DDS_Client::main_loop(void)
const uint64_t ping_timeout_ms{1000};
const uint8_t ping_max_attempts{10};
if (!uxr_ping_agent_attempts(comm, ping_timeout_ms, ping_max_attempts)) {
GCS_SEND_TEXT(MAV_SEVERITY_ERROR, "DDS Client: No ping response, exiting");
GCS_SEND_TEXT(MAV_SEVERITY_ERROR, "%s No ping response, exiting", msg_prefix);
return;
}
// create session
if (!init_session() || !create()) {
GCS_SEND_TEXT(MAV_SEVERITY_ERROR, "DDS Client: Creation Requests failed");
GCS_SEND_TEXT(MAV_SEVERITY_ERROR, "%s Creation Requests failed", msg_prefix);
return;
}
connected = true;
GCS_SEND_TEXT(MAV_SEVERITY_INFO, "DDS Client: Initialization passed");
GCS_SEND_TEXT(MAV_SEVERITY_INFO, "%s Initialization passed", msg_prefix);
populate_static_transforms(tx_static_transforms_topic);
write_static_transforms();
@ -705,7 +705,7 @@ void AP_DDS_Client::main_loop(void)
if (num_pings_missed > 2) {
GCS_SEND_TEXT(MAV_SEVERITY_ERROR,
"DDS Client: No ping response, disconnecting");
"%s No ping response, disconnecting", msg_prefix);
connected = false;
}
}