summaryrefslogtreecommitdiffstats
path: root/src/cameras
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2012-04-27 09:59:01 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2012-04-27 09:59:01 +0200
commitb37cf7c689193940830b3e01f45771c97f9e5729 (patch)
treeb10052499c68331fb27d8eea3702a4f136b7aa44 /src/cameras
parent36b9bc8bb9669bce57c6d085c4051f86850b5313 (diff)
downloaduca-b37cf7c689193940830b3e01f45771c97f9e5729.tar.gz
uca-b37cf7c689193940830b3e01f45771c97f9e5729.tar.bz2
uca-b37cf7c689193940830b3e01f45771c97f9e5729.tar.xz
uca-b37cf7c689193940830b3e01f45771c97f9e5729.zip
pco: Add sensor temperature
Diffstat (limited to 'src/cameras')
-rw-r--r--src/cameras/uca-pco-camera.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/cameras/uca-pco-camera.c b/src/cameras/uca-pco-camera.c
index 0183bcd..2ea31fd 100644
--- a/src/cameras/uca-pco-camera.c
+++ b/src/cameras/uca-pco-camera.c
@@ -71,6 +71,7 @@ GQuark uca_pco_camera_error_quark()
enum {
PROP_NAME = N_BASE_PROPERTIES,
+ PROP_SENSOR_TEMPERATURE,
PROP_DELAY_TIME,
PROP_COOLING_POINT,
N_PROPERTIES
@@ -588,6 +589,14 @@ static void uca_pco_camera_get_property(GObject *object, guint property_id, GVal
g_value_set_uint(value, 16);
break;
+ case PROP_SENSOR_TEMPERATURE:
+ {
+ guint32 ccd, camera, power;
+ pco_get_temperature(priv->pco, &ccd, &camera, &power);
+ g_value_set_double(value, ccd / 10.0);
+ }
+ break;
+
case PROP_EXPOSURE_TIME:
{
uint32_t exposure_time;
@@ -741,6 +750,13 @@ static void uca_pco_camera_class_init(UcaPcoCameraClass *klass)
"Name of the camera",
"Name of the camera",
"", G_PARAM_READABLE);
+
+ pco_properties[PROP_SENSOR_TEMPERATURE] =
+ g_param_spec_double("sensor-temperature",
+ "Temperature of the sensor",
+ "Temperature of the sensor in degree Celsius",
+ -G_MAXDOUBLE, G_MAXDOUBLE, 0.0,
+ G_PARAM_READABLE);
pco_properties[PROP_DELAY_TIME] =
g_param_spec_double("delay-time",