Log error and return if no devices

This commit is contained in:
John Zhao
2018-05-15 22:01:15 +08:00
parent 276406dd1e
commit de0f0d0639
26 changed files with 92 additions and 4 deletions

View File

@@ -25,14 +25,22 @@ class Device;
namespace device {
/** Detecting MYNT EYE devices and prompt user to select one */
/**
* Detecting MYNT EYE devices and prompt user to select one.
* @return the selected device, or `nullptr` if none.
*/
MYNTEYE_API std::shared_ptr<Device> select();
} // namespace device
namespace utils {
/** Get real exposure time in ms from virtual value, according to its frame rate
/**
* Get real exposure time in ms from virtual value, according to its frame rate.
* @param frame_rate the frame rate of the device.
* @param exposure_time the virtual exposure time.
* @return the real exposure time in ms, or the virtual value if frame rate is
* invalid.
*/
MYNTEYE_API float get_real_exposure_time(
std::int32_t frame_rate, std::uint16_t exposure_time);