ros-drivers / pointgrey_camera_driver

ROS driver for Pt. Grey cameras, based on the official FlyCapture2 SDK.
128 stars 179 forks source link

Usage of uint16_t #37

Closed versatran01 closed 8 years ago

versatran01 commented 9 years ago

Is there any particular reason for using uint16_t instead of just unsigned? e.g. bool PointGreyCamera::setWhiteBalance(uint16_t &blue, uint16_t &red)

mikepurvis commented 8 years ago

No particular reason, but note that the blue and red values get bit-shifted into a single 32-bit register, so there'd be nothing gained from them being larger types.

cf. https://github.com/ros-drivers/pointgrey_camera_driver/blob/18e181310871dad14cb0a4d06b662adeb5562bba/pointgrey_camera_driver/src/PointGreyCamera.cpp#L576