Add getTemperature method
This commit is contained in:
17
uvoscam.cpp
17
uvoscam.cpp
@ -397,6 +397,23 @@ bool Camera::setExposureTime(uint64_t us)
|
|||||||
return !error;
|
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()
|
uint64_t Camera::getExposureTime()
|
||||||
{
|
{
|
||||||
GError* error = nullptr;
|
GError* error = nullptr;
|
||||||
|
@ -40,7 +40,7 @@ public:
|
|||||||
class Description
|
class Description
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
size_t hash = 0;
|
uint64_t hash = 0;
|
||||||
std::string vendor_;
|
std::string vendor_;
|
||||||
std::string serial_;
|
std::string serial_;
|
||||||
std::string model_;
|
std::string model_;
|
||||||
@ -53,7 +53,7 @@ public:
|
|||||||
hash = std::hash<std::string>{}(vendor_ + serial_ + model_);
|
hash = std::hash<std::string>{}(vendor_ + serial_ + model_);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t getId() const
|
uint64_t getId() const
|
||||||
{
|
{
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
@ -172,6 +172,7 @@ public:
|
|||||||
bool startAcquisition();
|
bool startAcquisition();
|
||||||
bool stopAcquisition();
|
bool stopAcquisition();
|
||||||
bool setMtu(int mtu);
|
bool setMtu(int mtu);
|
||||||
|
bool getTemperature(double& temperature);
|
||||||
void getSize(unsigned int* x, unsigned int* y);
|
void getSize(unsigned int* x, unsigned int* y);
|
||||||
void setBayerMode(Camera::BayerMode mode);
|
void setBayerMode(Camera::BayerMode mode);
|
||||||
Camera::BayerMode getBayerMode();
|
Camera::BayerMode getBayerMode();
|
||||||
|
Reference in New Issue
Block a user