-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RSDK-8790: Add frame_rate to Go SDK #4377
Conversation
Warning your change may break code samples. If your change modifies any of the following functions please contact @viamrobotics/fleet-management. Thanks!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few nits, generally looking really good! You will need to bump the api version once your API change is merged into the API repo. Also, because none of the cameras broke, modules should not break either. Caveat: this is true for python and go, I don't see a reason for an additive change to break a C++ module, but we'll keep an eye on the intelrealsense when we bump the sdk version there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
@@ -316,6 +316,11 @@ func (c *client) Properties(ctx context.Context) (Properties, error) { | |||
} | |||
result.MimeTypes = resp.MimeTypes | |||
result.SupportsPCD = resp.SupportsPcd | |||
|
|||
// Check if the optional frame_rate is present and set it if it exists | |||
if resp.FrameRate != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need this check because if we attempt dereference the pointer when nil we will get a panic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes - we will get undefined behavior if we dereference a null pointer so that is why i put that check in place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much cleaner tests! LGTM
Blocked by the API changes being merged (API PR #553)
frame_rate
to the properties structframe_rate
tocamera_test.go
and tested for when frame_rate is set vs not set (since it is optional)frame_rate
to the client and server files for go SDKframe_rate
to camera'sclient_test.go
andserver_test.go
to test for when frame_rate is set vs not set