Skip to content

Commit

Permalink
update camera auto-generated code
Browse files Browse the repository at this point in the history
  • Loading branch information
potaito committed Jan 25, 2023
1 parent d812bdb commit 43d0554
Show file tree
Hide file tree
Showing 5 changed files with 136 additions and 124 deletions.
2 changes: 2 additions & 0 deletions src/mavsdk/plugins/camera/camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@ std::ostream& operator<<(std::ostream& str, Camera::Result const& result)
return str << "Wrong Argument";
case Camera::Result::NoSystem:
return str << "No System";
case Camera::Result::ProtocolUnsupported:
return str << "Protocol Unsupported";
default:
return str << "Unknown";
}
Expand Down
1 change: 1 addition & 0 deletions src/mavsdk/plugins/camera/include/plugins/camera/camera.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ class Camera : public PluginBase {
Timeout, /**< @brief Command timed out. */
WrongArgument, /**< @brief Command has wrong argument(s). */
NoSystem, /**< @brief No system connected. */
ProtocolUnsupported, /**< @brief Definition file protocol not supported. */
};

/**
Expand Down
248 changes: 125 additions & 123 deletions src/mavsdk_server/src/generated/camera/camera.pb.cc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/mavsdk_server/src/generated/camera/camera.pb.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/mavsdk_server/src/plugins/camera/camera_service_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ class CameraServiceImpl final : public rpc::camera::CameraService::Service {
return rpc::camera::CameraResult_Result_RESULT_WRONG_ARGUMENT;
case mavsdk::Camera::Result::NoSystem:
return rpc::camera::CameraResult_Result_RESULT_NO_SYSTEM;
case mavsdk::Camera::Result::ProtocolUnsupported:
return rpc::camera::CameraResult_Result_RESULT_PROTOCOL_UNSUPPORTED;
}
}

Expand Down Expand Up @@ -152,6 +154,8 @@ class CameraServiceImpl final : public rpc::camera::CameraService::Service {
return mavsdk::Camera::Result::WrongArgument;
case rpc::camera::CameraResult_Result_RESULT_NO_SYSTEM:
return mavsdk::Camera::Result::NoSystem;
case rpc::camera::CameraResult_Result_RESULT_PROTOCOL_UNSUPPORTED:
return mavsdk::Camera::Result::ProtocolUnsupported;
}
}

Expand Down

0 comments on commit 43d0554

Please sign in to comment.