Skip to content

Commit

Permalink
Merge pull request #2446 from mavlink/pr-ftp-warning
Browse files Browse the repository at this point in the history
core: remove way too verbose warnings
  • Loading branch information
julianoes authored Nov 20, 2024
2 parents 0d3be79 + 7d64db7 commit c963c51
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/mavsdk/core/mavlink_ftp_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,17 @@ void MavlinkFtpClient::process_mavlink_ftp_message(const mavlink_message_t& msg)
mavlink_msg_file_transfer_protocol_decode(&msg, &ftp_req);

if (ftp_req.target_system != 0 && ftp_req.target_system != _system_impl.get_own_system_id()) {
LogWarn() << "Received FTP with wrong target system ID!";
if (_debugging) {
LogDebug() << "Received FTP message with wrong target system ID";
}
return;
}

if (ftp_req.target_component != 0 &&
ftp_req.target_component != _system_impl.get_own_component_id()) {
LogWarn() << "Received FTP with wrong target component ID!";
if (_debugging) {
LogDebug() << "Received FTP message with wrong target component ID";
}
return;
}

Expand Down
8 changes: 6 additions & 2 deletions src/mavsdk/core/mavlink_ftp_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,17 @@ void MavlinkFtpServer::process_mavlink_ftp_message(const mavlink_message_t& msg)

if (ftp_req.target_system != 0 &&
ftp_req.target_system != _server_component_impl.get_own_system_id()) {
LogWarn() << "wrong sysid!";
if (_debugging) {
LogDebug() << "Received FTP message with wrong target system ID";
}
return;
}

if (ftp_req.target_component != 0 &&
ftp_req.target_component != _server_component_impl.get_own_component_id()) {
LogWarn() << "wrong compid!";
if (_debugging) {
LogDebug() << "Received FTP message with wrong target component ID";
}
return;
}

Expand Down

0 comments on commit c963c51

Please sign in to comment.