From b1e3aa27d505551a6e3656ecb828ac05617badaa Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Thu, 31 May 2012 17:19:30 +0200 Subject: Warn if cooling point cannot be set/read --- src/cameras/uca-pco-camera.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cameras/uca-pco-camera.c b/src/cameras/uca-pco-camera.c index dfc29e4..ad5cb77 100644 --- a/src/cameras/uca-pco-camera.c +++ b/src/cameras/uca-pco-camera.c @@ -284,6 +284,8 @@ static guint override_temperature_range(UcaPcoCameraPrivate *priv) spec->maximum = max_temp; spec->default_value = default_temp; } + else + g_warning("Unable to retrieve cooling range"); return err; } @@ -966,7 +968,8 @@ static void uca_pco_camera_get_property(GObject *object, guint property_id, GVal case PROP_COOLING_POINT: { int16_t temperature; - pco_get_cooling_temperature(priv->pco, &temperature); + if (pco_get_cooling_temperature(priv->pco, &temperature) != PCO_NOERROR) + g_warning("Cannot read cooling temperature\n"); g_value_set_int(value, temperature); } break; -- cgit v1.2.3