Skip to content

Commit

Permalink
Merge pull request #24 from stereolabs/v4.2.0
Browse files Browse the repository at this point in the history
push to 4.2.0
  • Loading branch information
Bvallon-sl authored Oct 2, 2024
2 parents 80fc742 + 91b2b1a commit f8fa511
Show file tree
Hide file tree
Showing 5 changed files with 233 additions and 144 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This package lets you use the ZED stereo camera in C#. The C# API is a wrapper a
- Visual Studio 2017 with C# extensions
- Cmake 3.23 at least
- [C wrapper](https://github.com/stereolabs/zed-c-api) of the ZED SDK
- [ZED SDK **4.1.0**](https://www.stereolabs.com/developers/release/) and its dependency ([CUDA](https://developer.nvidia.com/cuda-downloads))
- [ZED SDK **4.2.0**](https://www.stereolabs.com/developers/release/) and its dependency ([CUDA](https://developer.nvidia.com/cuda-downloads))

## From NuGet

Expand Down
2 changes: 1 addition & 1 deletion Stereolabs.zed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ target_compile_options(${PROJECT_NAME} PRIVATE "/platform:x64" )
set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.6.1")

# Set the C# language version, otherwise default 3.0 is taken
set(CMAKE_CSharp_FLAGS "/langversion:7")
set(CMAKE_CSharp_FLAGS "/langversion:10")


# Set configuration type as Class Library
Expand Down
6 changes: 3 additions & 3 deletions Stereolabs.zed/src/ZEDCamera.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@ public void Close()
/// The grabbing method is typically called in the main loop in a separate thread.
/// \note For more info, read about the SDK method it calls:
/// <a href="https://www.stereolabs.com/docs/api/classsl_1_1Camera.html#afa3678a18dd574e162977e97d7cbf67b">grab</a>.
/// </remarks>
/// </summary>
/// <param name="runtimeParameters">A structure containing all the runtime parameters. Default: a preset of RuntimeParameters.</param>
/// <returns>false if no problem was encountered, true otherwise.</returns>
public sl.ERROR_CODE Grab(ref sl.RuntimeParameters runtimeParameters)
Expand Down Expand Up @@ -3097,14 +3097,14 @@ public sl.ERROR_CODE RetrieveObjects(ref Objects objs, ref ObjectDetectionRuntim
/// <param name="bt_params"> Body tracking runtime parameters </param>
/// <param name="instanceID">Id of the body tracking instance. Used when multiple instances of the body tracking module are enabled at the same time.</param>
/// <returns>sl.ERROR_CODE.SUCCESS if everything went fine, sl.ERROR_CODE.FAILURE otherwise.</returns>
public sl.ERROR_CODE RetrieveBodies(ref Bodies objs, ref BodyTrackingRuntimeParameters bt_params, uint instanceID = 0)
public sl.ERROR_CODE RetrieveBodies(ref Bodies bodies, ref BodyTrackingRuntimeParameters bt_params, uint instanceID = 0)
{
IntPtr p = Marshal.AllocHGlobal(System.Runtime.InteropServices.Marshal.SizeOf<sl.Bodies>());
sl.ERROR_CODE err = (sl.ERROR_CODE)dllz_retrieve_bodies_data(CameraID, ref bt_params, p, instanceID);

if (p != IntPtr.Zero)
{
objs = (sl.Bodies)Marshal.PtrToStructure(p, typeof(sl.Bodies));
bodies = (sl.Bodies)Marshal.PtrToStructure(p, typeof(sl.Bodies));
Marshal.FreeHGlobal(p);
return err;
}
Expand Down
Loading

0 comments on commit f8fa511

Please sign in to comment.