Add getTemperature method
This commit is contained in:
parent
5071da304b
commit
7af2622012
2 changed files with 20 additions and 2 deletions
17
uvoscam.cpp
17
uvoscam.cpp
|
|
@ -397,6 +397,23 @@ bool Camera::setExposureTime(uint64_t us)
|
|||
return !error;
|
||||
}
|
||||
|
||||
bool Camera::getTemperature(double& temperature)
|
||||
{
|
||||
GError* error = nullptr;
|
||||
bool temperatureAvailable = arv_camera_is_feature_available(aCamera_, "DeviceTemperature", &error);
|
||||
if(error || !temperatureAvailable )
|
||||
return false;
|
||||
|
||||
temperature = arv_device_get_float_feature_value(arv_camera_get_device(aCamera_), "DeviceTemperature", &error);
|
||||
|
||||
if(error)
|
||||
{
|
||||
Log(Log::WARN)<<error->message;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
uint64_t Camera::getExposureTime()
|
||||
{
|
||||
GError* error = nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue