intel / collision-avoidance-library

A framework for testing and benchmarking collision avoidance strategies
Apache License 2.0
81 stars 39 forks source link

R200 autoexposure #119

Closed mbelluzzo closed 7 years ago

mbelluzzo commented 7 years ago

Owu, I thought you was suggesting to be only local (and not static). In this case the local and global variables will end up on the same place of the object output. Even that the current way is visible for other functions in this file, its local to this TU what is enough for me. So I prefer to have it on a global scope and have the function code a less cumbersome, specially because we will add more of those vectors in a close future to address other RS camera models so the number of variables will keep growing.

On Thu, Apr 20, 2017 at 11:57 AM, Otavio Pontes notifications@github.com wrote:

@otaviobp commented on this pull request.

In src/sensors/RealSenseCamera.cc https://github.com/01org/collision-avoidance-library/pull/119#discussion_r112534023 :

@@ -41,6 +54,10 @@ RealSenseCamera::RealSenseCamera(size_t width, size_t height, unsigned int fps)

 this->scale = this->dev->get_depth_scale();
  • if (this->dev->supports_option(r200_opts[0])) {
  • this->dev->set_options(r200_opts, ARRAY_SIZE(r200_opts), r200_values);

You could use a static local variable. So they are in the scope of the function. I prefer this way, but it is up to you. Other than that, the patch looks ok for me.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/01org/collision-avoidance-library/pull/119#discussion_r112534023, or mute the thread https://github.com/notifications/unsubscribe-auth/ABgsZaMfTSL_4BfpYPh8abuCl8W6ker3ks5rx6qQgaJpZM4M-Hz4 .