Skip to content

Commit

Permalink
more system tests
Browse files Browse the repository at this point in the history
  • Loading branch information
julianoes committed Oct 1, 2024
1 parent 455a39d commit 49fac96
Show file tree
Hide file tree
Showing 16 changed files with 461 additions and 422 deletions.
2 changes: 1 addition & 1 deletion proto
Submodule proto updated from cce2f0 to 4e59e5
11 changes: 6 additions & 5 deletions src/mavsdk/core/mavlink_command_receiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ void MavlinkCommandReceiver::receive_command_long(const mavlink_message_t& messa
if (cmd.target_component_id != _server_component_impl.get_own_component_id() &&
cmd.target_component_id != MAV_COMP_ID_ALL) {
if (_debugging) {
LogDebug() << "Ignored command long to component " << (int)cmd.target_component_id
<< " instead of " << (int)_server_component_impl.get_own_component_id();
LogDebug() << "Ignored command long to component "
<< std::to_string(cmd.target_component_id) << " instead of "
<< std::to_string(_server_component_impl.get_own_component_id());
}
return;
}
Expand All @@ -106,7 +107,7 @@ void MavlinkCommandReceiver::receive_command_long(const mavlink_message_t& messa
for (auto& handler : _mavlink_command_long_handler_table) {
if (handler.cmd_id == cmd.command) {
if (_debugging) {
LogDebug() << "Handling command long " << (int)cmd.command;
LogDebug() << "Handling command long " << std::to_string(cmd.command);
}

// The client side can pack a COMMAND_ACK as a response to receiving the command.
Expand All @@ -124,8 +125,8 @@ void MavlinkCommandReceiver::receive_command_long(const mavlink_message_t& messa
return response_message;
});
if (_debugging) {
LogDebug() << "Acked command long " << (int)cmd.command << " with "
<< maybe_command_ack.value().result;
LogDebug() << "Acked command long " << std::to_string(cmd.command) << " with "
<< std::to_string(maybe_command_ack.value().result);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/mavsdk/core/string_utils_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ TEST(StringUtils, StripPrefix)
EXPECT_EQ(strip_prefix("blafoo", "1234"), "blafoo");
EXPECT_EQ(strip_prefix("blafoo", "foo"), "blafoo");
EXPECT_EQ(strip_prefix("", ""), "");
EXPECT_EQ(strip_prefix("", "b"), "b");
EXPECT_EQ(strip_prefix("", "b"), "");
EXPECT_EQ(strip_prefix("f", ""), "f");
}
2 changes: 2 additions & 0 deletions src/mavsdk/plugins/camera/camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,8 @@ std::ostream& operator<<(std::ostream& str, Camera::Result const& result)
return str << "Settings Loading";
case Camera::Result::CameraIdInvalid:
return str << "Camera Id Invalid";
case Camera::Result::ActionUnsupported:
return str << "Action Unsupported";
default:
return str << "Unknown";
}
Expand Down
Loading

0 comments on commit 49fac96

Please sign in to comment.