From f85327f951ad96a0fe41f473992d8f16cc2922cf Mon Sep 17 00:00:00 2001 From: Mihael Koep Date: Tue, 7 Aug 2012 16:12:03 +0200 Subject: First compiling version of dexela implementation. --- src/CMakeLists.txt | 14 ++++ src/cameras/uca-dexela-camera.c | 164 ++++++++++++++++++++++++++++++++++++++++ src/cameras/uca-dexela-camera.h | 68 +++++++++++++++++ src/config.h.in | 1 + src/uca-camera.c | 7 ++ 5 files changed, 254 insertions(+) create mode 100644 src/cameras/uca-dexela-camera.c create mode 100644 src/cameras/uca-dexela-camera.h (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9508c5c..94de82d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -18,6 +18,7 @@ find_package(PCO) find_package(PF) find_package(IPE) find_package(Pylon) +find_package(DEXELA) # --- Find frame grabber interfaces find_package(FgLib5) @@ -103,7 +104,20 @@ if (PYLON_FOUND) include_directories(${LIBPYLONCAM_INCLUDEDIR}) link_directories(${LIBPYLONCAM_LIBDIR}) endif() +endif() + +if (DEXELA_FOUND) + option(HAVE_DEXELA_CL "Camera: CameraLink-based dexela detector" ON) + + if (HAVE_DEXELA_CL) + list(APPEND uca_SRCS cameras/uca-dexela-camera.c) + list(APPEND uca_HDRS cameras/uca-dexela-camera.h) + list(APPEND cameras "Ufo") + + set(uca_LIBS ${uca_LIBS} ${DEXELA_LIBRARIES}) + include_directories(${DEXELA_INCLUDE_DIRS}) + endif() endif() if (HAVE_MOCK_CAMERA) diff --git a/src/cameras/uca-dexela-camera.c b/src/cameras/uca-dexela-camera.c new file mode 100644 index 0000000..576c769 --- /dev/null +++ b/src/cameras/uca-dexela-camera.c @@ -0,0 +1,164 @@ +/* Copyright (C) 2011, 2012 Mihael Koep + (Softwareschneiderei GmbH) + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by the + Free Software Foundation; either version 2.1 of the License, or (at your + option) any later version. + + This library is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + details. + + You should have received a copy of the GNU Lesser General Public License along + with this library; if not, write to the Free Software Foundation, Inc., 51 + Franklin St, Fifth Floor, Boston, MA 02110, USA */ + +#include "uca-camera.h" +#include "uca-dexela-camera.h" +#include "uca-enums.h" + +#define UCA_DEXELA_CAMERA_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), UCA_TYPE_DEXELA_CAMERA, UcaDexelaCameraPrivate)) + +G_DEFINE_TYPE(UcaDexelaCamera, uca_dexela_camera, UCA_TYPE_CAMERA) +/** + * UcaDexelaCameraError: + * @UCA_DEXELA_CAMERA_ERROR_LIBPCO_INIT: Initializing libdexela failed + */ +GQuark uca_pco_camera_error_quark() +{ + return g_quark_from_static_string("uca-dexela-camera-error-quark"); +} + +enum { + PROP_SENSOR_EXTENDED = N_BASE_PROPERTIES, + N_PROPERTIES +}; + +static gint base_overrideables[] = { + PROP_NAME, + PROP_SENSOR_WIDTH, + PROP_SENSOR_HEIGHT, + PROP_SENSOR_BITDEPTH, + PROP_SENSOR_HORIZONTAL_BINNING, + PROP_SENSOR_HORIZONTAL_BINNINGS, + PROP_SENSOR_VERTICAL_BINNING, + PROP_SENSOR_VERTICAL_BINNINGS, + PROP_SENSOR_MAX_FRAME_RATE, + PROP_EXPOSURE_TIME, + PROP_TRIGGER_MODE, + PROP_ROI_X, + PROP_ROI_Y, + PROP_ROI_WIDTH, + PROP_ROI_HEIGHT, + PROP_ROI_WIDTH_MULTIPLIER, + PROP_ROI_HEIGHT_MULTIPLIER, + PROP_HAS_STREAMING, + PROP_HAS_CAMRAM_RECORDING, + 0 +}; + +static GParamSpec *dexela_properties[N_PROPERTIES] = { NULL, }; + +struct _UcaDexelaCameraPrivate { +}; + +UcaDexelaCamera *uca_dexela_camera_new(GError **error) +{ + UcaDexelaCamera *camera = g_object_new(UCA_TYPE_DEXELA_CAMERA, NULL); + UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(camera); + /* + * Here we override property ranges because we didn't know them at property + * installation time. + */ + GObjectClass *camera_class = G_OBJECT_CLASS (UCA_CAMERA_GET_CLASS (camera)); + return camera; +} + +static void uca_dexela_camera_set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) +{ + UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(object); + + switch (property_id) { + case PROP_EXPOSURE_TIME: + { + // TODO set exposure time + + } + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); + return; + } +} + +static void uca_dexela_camera_get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) +{ + UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(object); + + switch (property_id) { + case PROP_EXPOSURE_TIME: + { + // TODO read exposure time + } + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); + break; + } +} + +static void uca_dexela_camera_start_recording(UcaCamera *camera, GError **error) +{ +} + +static void uca_dexela_camera_stop_recording(UcaCamera *camera, GError **error) +{ +} + +static void uca_dexela_camera_start_readout(UcaCamera *camera, GError **error) +{ +} + +static void uca_dexela_camera_trigger(UcaCamera *camera, GError **error) +{ +} + +static void uca_dexela_camera_grab(UcaCamera *camera, gpointer *data, GError **error) +{ +} + +static void uca_dexela_camera_finalize(GObject *object) +{ + UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(object); + G_OBJECT_CLASS(uca_dexela_camera_parent_class)->finalize(object); +} + +static void uca_dexela_camera_class_init(UcaDexelaCameraClass *klass) +{ + GObjectClass *gobject_class = G_OBJECT_CLASS(klass); + gobject_class->set_property = uca_dexela_camera_set_property; + gobject_class->get_property = uca_dexela_camera_get_property; + gobject_class->finalize = uca_dexela_camera_finalize; + + UcaCameraClass *camera_class = UCA_CAMERA_CLASS(klass); + camera_class->start_recording = uca_dexela_camera_start_recording; + camera_class->stop_recording = uca_dexela_camera_stop_recording; + camera_class->start_readout = uca_dexela_camera_start_readout; + camera_class->trigger = uca_dexela_camera_trigger; + camera_class->grab = uca_dexela_camera_grab; + + for (guint i = 0; base_overrideables[i] != 0; i++) + g_object_class_override_property(gobject_class, base_overrideables[i], uca_camera_props[base_overrideables[i]]); + + for (guint id = N_BASE_PROPERTIES; id < N_PROPERTIES; id++) { + g_object_class_install_property(gobject_class, id, dexela_properties[id]); + } + g_type_class_add_private(klass, sizeof(UcaDexelaCameraPrivate)); +} + +static void uca_dexela_camera_init(UcaDexelaCamera *self) +{ + self->priv = UCA_DEXELA_CAMERA_GET_PRIVATE(self); +} diff --git a/src/cameras/uca-dexela-camera.h b/src/cameras/uca-dexela-camera.h new file mode 100644 index 0000000..9badf10 --- /dev/null +++ b/src/cameras/uca-dexela-camera.h @@ -0,0 +1,68 @@ +/* Copyright (C) 2011, 2012 Mihael Koep + (Softwareschneiderei GmbH) + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by the + Free Software Foundation; either version 2.1 of the License, or (at your + option) any later version. + + This library is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + details. + + You should have received a copy of the GNU Lesser General Public License along + with this library; if not, write to the Free Software Foundation, Inc., 51 + Franklin St, Fifth Floor, Boston, MA 02110, USA */ + +#ifndef __UCA_DEXELA_CAMERA_H +#define __UCA_DEXELA_CAMERA_H + +#include +#include "uca-camera.h" + +#define UCA_TYPE_DEXELA_CAMERA (uca_dexela_camera_get_type()) +#define UCA_DEXELA_CAMERA(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), UCA_TYPE_DEXELA_CAMERA, UcaDexelaCamera)) +#define UCA_IS_DEXELA_CAMERA(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), UCA_TYPE_DEXELA_CAMERA)) +#define UCA_DEXELA_CAMERA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), UCA_TYPE_DEXELA_CAMERA, UcaDexelaCameraClass)) +#define UCA_IS_DEXELA_CAMERA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), UCA_TYPE_DEXELA_CAMERA)) +#define UCA_DEXELA_CAMERA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), UCA_TYPE_DEXELA_CAMERA, UcaDexelaCameraClass)) + +#define UCA_DEXELA_CAMERA_ERROR uca_dexela_camera_error_quark() +typedef enum { + UCA_DEXELA_CAMERA_ERROR_LIBPCO_INIT, +} UcaDexelaCameraError; + +typedef struct _UcaDexelaCamera UcaDexelaCamera; +typedef struct _UcaDexelaCameraClass UcaDexelaCameraClass; +typedef struct _UcaDexelaCameraPrivate UcaDexelaCameraPrivate; + +/** + * UcaDexelaCamera: + * + * Creates #UcaDexelaCamera instances by loading corresponding shared objects. The + * contents of the #UcaDexelaCamera structure are private and should only be + * accessed via the provided API. + */ +struct _UcaDexelaCamera { + /*< private >*/ + UcaCamera parent; + + UcaDexelaCameraPrivate *priv; +}; + +/** + * UcaDexelaCameraClass: + * + * #UcaDexelaCamera class + */ +struct _UcaDexelaCameraClass { + /*< private >*/ + UcaCameraClass parent; +}; + +UcaDexelaCamera *uca_dexela_camera_new(GError **error); + +GType uca_dexela_camera_get_type(void); + +#endif diff --git a/src/config.h.in b/src/config.h.in index e3911a1..ec1fb62 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -3,6 +3,7 @@ #cmakedefine HAVE_PHOTRON_FASTCAM #cmakedefine HAVE_UFO_CAMERA #cmakedefine HAVE_PYLON_CAMERA +#cmakedefine HAVE_DEXELA_CL #cmakedefine HAVE_MOCK_CAMERA #define CONTROL_GLADE_PATH "${CMAKE_INSTALL_PREFIX}/share/libuca/control.glade" diff --git a/src/uca-camera.c b/src/uca-camera.c index 78adae3..6b4b9f1 100644 --- a/src/uca-camera.c +++ b/src/uca-camera.c @@ -40,6 +40,10 @@ #include "cameras/uca-pf-camera.h" #endif +#ifdef HAVE_DEXELA_CL +#include "cameras/uca-dexela-camera.h" +#endif + #define UCA_CAMERA_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), UCA_TYPE_CAMERA, UcaCameraPrivate)) G_DEFINE_TYPE(UcaCamera, uca_camera, G_TYPE_OBJECT) @@ -80,6 +84,9 @@ static gchar *uca_camera_types[] = { #endif #ifdef HAVE_PHOTON_FOCUS "pf", +#endif +#ifdef HAVE_DEXELA_CL + "dexela", #endif NULL }; -- cgit v1.2.3 From a741bab1373beb5bef1d7028870af5ae7d493558 Mon Sep 17 00:00:00 2001 From: Mihael Koep Date: Tue, 7 Aug 2012 17:30:39 +0200 Subject: Fix indentation and implement the name property. --- src/cameras/uca-dexela-camera.c | 49 +++++++++++++++++++++++++---------------- src/uca-camera.c | 5 +++++ 2 files changed, 35 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/cameras/uca-dexela-camera.c b/src/cameras/uca-dexela-camera.c index 576c769..ba4aea0 100644 --- a/src/cameras/uca-dexela-camera.c +++ b/src/cameras/uca-dexela-camera.c @@ -18,6 +18,8 @@ #include "uca-camera.h" #include "uca-dexela-camera.h" #include "uca-enums.h" +#include "dexela_api.h" +#include "dexela_lowlevel.h" #define UCA_DEXELA_CAMERA_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), UCA_TYPE_DEXELA_CAMERA, UcaDexelaCameraPrivate)) @@ -32,8 +34,7 @@ GQuark uca_pco_camera_error_quark() } enum { - PROP_SENSOR_EXTENDED = N_BASE_PROPERTIES, - N_PROPERTIES + N_PROPERTIES = N_BASE_PROPERTIES, }; static gint base_overrideables[] = { @@ -67,26 +68,29 @@ struct _UcaDexelaCameraPrivate { UcaDexelaCamera *uca_dexela_camera_new(GError **error) { UcaDexelaCamera *camera = g_object_new(UCA_TYPE_DEXELA_CAMERA, NULL); - UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(camera); + //UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(camera); /* - * Here we override property ranges because we didn't know them at property - * installation time. - */ + * Here we override property ranges because we didn't know them at property + * installation time. + */ GObjectClass *camera_class = G_OBJECT_CLASS (UCA_CAMERA_GET_CLASS (camera)); + // TODO implement error checking + openDetector(); + initSerialConnection(); return camera; } static void uca_dexela_camera_set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { - UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(object); + //UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(object); switch (property_id) { case PROP_EXPOSURE_TIME: - { - // TODO set exposure time - - } - break; + { + // TODO set exposure time + + } + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); return; @@ -95,13 +99,20 @@ static void uca_dexela_camera_set_property(GObject *object, guint property_id, c static void uca_dexela_camera_get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { - UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(object); + //UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(object); switch (property_id) { + case PROP_NAME: + { + gchar* model = getModel(); + g_value_set_string(value, g_strdup_printf("Dexela %s", model)); + g_free(model); + break; + } case PROP_EXPOSURE_TIME: { - // TODO read exposure time - } + // TODO read exposure time + } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); @@ -131,7 +142,7 @@ static void uca_dexela_camera_grab(UcaCamera *camera, gpointer *data, GError **e static void uca_dexela_camera_finalize(GObject *object) { - UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(object); + //UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(object); G_OBJECT_CLASS(uca_dexela_camera_parent_class)->finalize(object); } @@ -154,11 +165,11 @@ static void uca_dexela_camera_class_init(UcaDexelaCameraClass *klass) for (guint id = N_BASE_PROPERTIES; id < N_PROPERTIES; id++) { g_object_class_install_property(gobject_class, id, dexela_properties[id]); - } - g_type_class_add_private(klass, sizeof(UcaDexelaCameraPrivate)); + } + //g_type_class_add_private(klass, sizeof(UcaDexelaCameraPrivate)); } static void uca_dexela_camera_init(UcaDexelaCamera *self) { - self->priv = UCA_DEXELA_CAMERA_GET_PRIVATE(self); + //self->priv = UCA_DEXELA_CAMERA_GET_PRIVATE(self); } diff --git a/src/uca-camera.c b/src/uca-camera.c index 6b4b9f1..d9d2d6a 100644 --- a/src/uca-camera.c +++ b/src/uca-camera.c @@ -404,6 +404,11 @@ static UcaCamera *uca_camera_new_from_type(const gchar *type, GError **error) return UCA_CAMERA(uca_pf_camera_new(error)); #endif +#ifdef HAVE_DEXELA_CL + if (!g_strcmp0(type, "dexela")) + return UCA_CAMERA(uca_dexela_camera_new(error)); +#endif + return NULL; } -- cgit v1.2.3 From c4f4ad5883e2305b252cfa5bdc585d105b8934e7 Mon Sep 17 00:00:00 2001 From: Mihael Koep Date: Tue, 28 Aug 2012 17:50:52 +0200 Subject: make dexela part compile again. --- src/cameras/uca-dexela-camera.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/cameras/uca-dexela-camera.c b/src/cameras/uca-dexela-camera.c index ba4aea0..ccba1c3 100644 --- a/src/cameras/uca-dexela-camera.c +++ b/src/cameras/uca-dexela-camera.c @@ -19,7 +19,6 @@ #include "uca-dexela-camera.h" #include "uca-enums.h" #include "dexela_api.h" -#include "dexela_lowlevel.h" #define UCA_DEXELA_CAMERA_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), UCA_TYPE_DEXELA_CAMERA, UcaDexelaCameraPrivate)) @@ -75,7 +74,7 @@ UcaDexelaCamera *uca_dexela_camera_new(GError **error) */ GObjectClass *camera_class = G_OBJECT_CLASS (UCA_CAMERA_GET_CLASS (camera)); // TODO implement error checking - openDetector(); + openDetector("/usr/share/dexela/dexela-1207_32.fmt"); initSerialConnection(); return camera; } -- cgit v1.2.3 From 363836b468a296771b77f122740ea8ef0498dbe2 Mon Sep 17 00:00:00 2001 From: Mihael Koep Date: Tue, 4 Sep 2012 11:49:47 +0200 Subject: Minor cleanup to trigger the build for testing our generic commit hook... --- src/cameras/uca-dexela-camera.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/cameras/uca-dexela-camera.c b/src/cameras/uca-dexela-camera.c index ccba1c3..50bd385 100644 --- a/src/cameras/uca-dexela-camera.c +++ b/src/cameras/uca-dexela-camera.c @@ -87,7 +87,6 @@ static void uca_dexela_camera_set_property(GObject *object, guint property_id, c case PROP_EXPOSURE_TIME: { // TODO set exposure time - } break; default: -- cgit v1.2.3 From 6e5eed16048cc25ec1346c1398516f8d9fe3c028 Mon Sep 17 00:00:00 2001 From: Mihael Koep Date: Tue, 4 Sep 2012 11:54:02 +0200 Subject: Minor reformatting to trigger the build for testing our generic commit hook... --- src/cameras/uca-dexela-camera.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/cameras/uca-dexela-camera.c b/src/cameras/uca-dexela-camera.c index 50bd385..a254989 100644 --- a/src/cameras/uca-dexela-camera.c +++ b/src/cameras/uca-dexela-camera.c @@ -108,13 +108,15 @@ static void uca_dexela_camera_get_property(GObject *object, guint property_id, G break; } case PROP_EXPOSURE_TIME: - { - // TODO read exposure time - } + { + // TODO read exposure time break; + } default: + { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; + } } } -- cgit v1.2.3 From c45a310216bc28a567195ebcc71d9e1cf0f16ba1 Mon Sep 17 00:00:00 2001 From: Mihael Koep Date: Tue, 4 Sep 2012 14:41:45 +0200 Subject: Fix the dexela error quark. --- src/cameras/uca-dexela-camera.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/cameras/uca-dexela-camera.c b/src/cameras/uca-dexela-camera.c index a254989..b68f40e 100644 --- a/src/cameras/uca-dexela-camera.c +++ b/src/cameras/uca-dexela-camera.c @@ -25,9 +25,9 @@ G_DEFINE_TYPE(UcaDexelaCamera, uca_dexela_camera, UCA_TYPE_CAMERA) /** * UcaDexelaCameraError: - * @UCA_DEXELA_CAMERA_ERROR_LIBPCO_INIT: Initializing libdexela failed + * @UCA_DEXELA_CAMERA_ERROR_LIBDEXELA_INIT: Initializing libdexela failed */ -GQuark uca_pco_camera_error_quark() +GQuark uca_dexela_camera_error_quark() { return g_quark_from_static_string("uca-dexela-camera-error-quark"); } -- cgit v1.2.3 From 2fad826eb9b5ca6a2825193e864545e2d4976966 Mon Sep 17 00:00:00 2001 From: Mihael Koep Date: Tue, 4 Sep 2012 16:07:09 +0200 Subject: Implement 64bit detection for install directory of libuca. --- src/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 94de82d..c318d52 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -264,7 +264,12 @@ endif() # --- Install target ---------------------------------------------------------- -set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}") +# check for 64 bit +if (CMAKE_SIZEOF_VOID_P EQUAL 8) + set(LIB_INSTALL_DIR "lib64") +else() + set(LIB_INSTALL_DIR "lib") +endif() install(TARGETS uca LIBRARY DESTINATION ${LIB_INSTALL_DIR}) -- cgit v1.2.3 From 7122b2c6fd1ae34438d019c72c10ec84776171d6 Mon Sep 17 00:00:00 2001 From: Mihael Koep Date: Thu, 6 Sep 2012 18:02:10 +0200 Subject: Implement exposure time property. --- src/cameras/uca-dexela-camera.c | 44 +++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/cameras/uca-dexela-camera.c b/src/cameras/uca-dexela-camera.c index b68f40e..14d7899 100644 --- a/src/cameras/uca-dexela-camera.c +++ b/src/cameras/uca-dexela-camera.c @@ -79,22 +79,6 @@ UcaDexelaCamera *uca_dexela_camera_new(GError **error) return camera; } -static void uca_dexela_camera_set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) -{ - //UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(object); - - switch (property_id) { - case PROP_EXPOSURE_TIME: - { - // TODO set exposure time - } - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); - return; - } -} - static void uca_dexela_camera_get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { //UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(object); @@ -109,7 +93,7 @@ static void uca_dexela_camera_get_property(GObject *object, guint property_id, G } case PROP_EXPOSURE_TIME: { - // TODO read exposure time + g_value_set_double(value, getExposureTimeMicros() / 10e6d); break; } default: @@ -120,24 +104,46 @@ static void uca_dexela_camera_get_property(GObject *object, guint property_id, G } } +static void uca_dexela_camera_set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) +{ + //UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(object); + + switch (property_id) { + case PROP_EXPOSURE_TIME: + { + const gdouble exposureTimeInSeconds = g_value_get_double(value); + setExposureTimeMicros(exposureTimeInSeconds * 10e6d); + } + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); + return; + } +} + static void uca_dexela_camera_start_recording(UcaCamera *camera, GError **error) { + g_debug("start recording called"); } static void uca_dexela_camera_stop_recording(UcaCamera *camera, GError **error) { + g_debug("stop recording called"); } static void uca_dexela_camera_start_readout(UcaCamera *camera, GError **error) { + g_debug("start readout called"); } static void uca_dexela_camera_trigger(UcaCamera *camera, GError **error) { + g_debug("trigger called"); } static void uca_dexela_camera_grab(UcaCamera *camera, gpointer *data, GError **error) { + g_debug("grab called"); } static void uca_dexela_camera_finalize(GObject *object) @@ -160,9 +166,9 @@ static void uca_dexela_camera_class_init(UcaDexelaCameraClass *klass) camera_class->trigger = uca_dexela_camera_trigger; camera_class->grab = uca_dexela_camera_grab; - for (guint i = 0; base_overrideables[i] != 0; i++) + for (guint i = 0; base_overrideables[i] != 0; i++) { g_object_class_override_property(gobject_class, base_overrideables[i], uca_camera_props[base_overrideables[i]]); - + } for (guint id = N_BASE_PROPERTIES; id < N_PROPERTIES; id++) { g_object_class_install_property(gobject_class, id, dexela_properties[id]); } -- cgit v1.2.3 From 4ee0daf9be362d25a4fde1ff9859197be9ce8c02 Mon Sep 17 00:00:00 2001 From: Mihael Koep Date: Thu, 6 Sep 2012 18:08:32 +0200 Subject: Standardize package naming. --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c318d52..ff9108e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -314,7 +314,7 @@ set(CPACK_GENERATOR "DEB;RPM;") set(CPACK_SOURCE_GENERATOR "TGZ") set(CPACK_SOURCE_IGNORE_FILES ".git" "tags" ".bzr" ".swp") set(CPACK_SOURCE_PACKAGE_FILE_NAME "libuca-${UCA_VERSION_STRING}" CACHE INTERNAL "tarball basename") -set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${UCA_VERSION_STRING}-${CMAKE_SYSTEM_PROCESSOR}") +set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${UCA_VERSION_STRING}-${CPACK_PACKAGE_RELEASE}.${CMAKE_SYSTEM_PROCESSOR}") configure_file("${CMAKE_CURRENT_SOURCE_DIR}/../libuca.spec.in" "${CMAKE_CURRENT_BINARY_DIR}/../libuca.spec" @ONLY IMMEDIATE) -- cgit v1.2.3 From 484a45bbebf1a5beebe6619bab8099758d1c0fc5 Mon Sep 17 00:00:00 2001 From: Mihael Koep Date: Wed, 12 Sep 2012 17:43:00 +0200 Subject: Implement sensor width, height, bit depth and binning properties. --- src/cameras/uca-dexela-camera.c | 113 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 105 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/cameras/uca-dexela-camera.c b/src/cameras/uca-dexela-camera.c index 14d7899..ca6781b 100644 --- a/src/cameras/uca-dexela-camera.c +++ b/src/cameras/uca-dexela-camera.c @@ -61,13 +61,45 @@ static gint base_overrideables[] = { static GParamSpec *dexela_properties[N_PROPERTIES] = { NULL, }; +static const gdouble MICROS_TO_SECONDS_FACTOR = 10e6d; + struct _UcaDexelaCameraPrivate { + GValueArray *binnings; }; +/** + * Hardcode possible binnings for now + */ +static void fill_binnings(UcaDexelaCameraPrivate *priv) +{ + GValue val = {0}; + g_value_init(&val, G_TYPE_UINT); + + priv->binnings = g_value_array_new(3); + g_value_set_uint(&val, 1); + g_value_array_append(priv->binnings, &val); + g_value_set_uint(&val, 2); + g_value_array_append(priv->binnings, &val); + g_value_set_uint(&val, 4); + g_value_array_append(priv->binnings, &val); +} + +static gboolean is_binning_allowed(UcaDexelaCameraPrivate *priv, guint binning) +{ + for (int i = 0; i < priv->binnings->n_values; i++) { + guint allowedBinning = g_value_get_uint(g_value_array_get_nth(priv->binnings, i)); + if (binning == allowedBinning) { + return TRUE; + } + } + return FALSE; +} + UcaDexelaCamera *uca_dexela_camera_new(GError **error) { UcaDexelaCamera *camera = g_object_new(UCA_TYPE_DEXELA_CAMERA, NULL); - //UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(camera); + UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(camera); + fill_binnings(priv); /* * Here we override property ranges because we didn't know them at property * installation time. @@ -81,7 +113,7 @@ UcaDexelaCamera *uca_dexela_camera_new(GError **error) static void uca_dexela_camera_get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { - //UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(object); + UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(object); switch (property_id) { case PROP_NAME: @@ -93,7 +125,52 @@ static void uca_dexela_camera_get_property(GObject *object, guint property_id, G } case PROP_EXPOSURE_TIME: { - g_value_set_double(value, getExposureTimeMicros() / 10e6d); + g_value_set_double(value, getExposureTimeMicros() / MICROS_TO_SECONDS_FACTOR); + break; + } + case PROP_HAS_CAMRAM_RECORDING: + { + g_value_set_boolean(value, FALSE); + break; + } + case PROP_HAS_STREAMING: + { + g_value_set_boolean(value, FALSE); + break; + } + case PROP_SENSOR_BITDEPTH: + { + g_value_set_uint(value, getBitDepth()); + break; + } + case PROP_SENSOR_WIDTH: + { + g_value_set_uint(value, getWidth()); + break; + } + case PROP_SENSOR_HEIGHT: + { + g_value_set_uint(value, getHeight()); + break; + } + case PROP_SENSOR_HORIZONTAL_BINNING: + { + g_value_set_uint(value, getBinningModeHorizontal()); + break; + } + case PROP_SENSOR_HORIZONTAL_BINNINGS: + { + g_value_set_boxed(value, priv->binnings); + break; + } + case PROP_SENSOR_VERTICAL_BINNING: + { + g_value_set_uint(value, getBinningModeVertical()); + break; + } + case PROP_SENSOR_VERTICAL_BINNINGS: + { + g_value_set_boxed(value, priv->binnings); break; } default: @@ -106,15 +183,35 @@ static void uca_dexela_camera_get_property(GObject *object, guint property_id, G static void uca_dexela_camera_set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { - //UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(object); + UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(object); switch (property_id) { case PROP_EXPOSURE_TIME: { const gdouble exposureTimeInSeconds = g_value_get_double(value); - setExposureTimeMicros(exposureTimeInSeconds * 10e6d); + setExposureTimeMicros(exposureTimeInSeconds * MICROS_TO_SECONDS_FACTOR); + break; + } + case PROP_SENSOR_HORIZONTAL_BINNING: + { + const guint horizontalBinning = g_value_get_uint(value); + if (!is_binning_allowed(priv, horizontalBinning)) { + g_warning("Tried to set illegal horizontal binning: %d", horizontalBinning); + return; + } + setBinningMode(horizontalBinning, getBinningModeVertical()); + break; + } + case PROP_SENSOR_VERTICAL_BINNING: + { + const guint verticalBinning = g_value_get_uint(value); + if (!is_binning_allowed(priv, verticalBinning)) { + g_warning("Tried to set illegal vertical binning: %d", verticalBinning); + return; + } + setBinningMode(getBinningModeHorizontal(), verticalBinning); + break; } - break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); return; @@ -172,10 +269,10 @@ static void uca_dexela_camera_class_init(UcaDexelaCameraClass *klass) for (guint id = N_BASE_PROPERTIES; id < N_PROPERTIES; id++) { g_object_class_install_property(gobject_class, id, dexela_properties[id]); } - //g_type_class_add_private(klass, sizeof(UcaDexelaCameraPrivate)); + g_type_class_add_private(klass, sizeof(UcaDexelaCameraPrivate)); } static void uca_dexela_camera_init(UcaDexelaCamera *self) { - //self->priv = UCA_DEXELA_CAMERA_GET_PRIVATE(self); + self->priv = UCA_DEXELA_CAMERA_GET_PRIVATE(self); } -- cgit v1.2.3 From 4f04ef64bf8c737b68500ecc8a72f4a374315abc Mon Sep 17 00:00:00 2001 From: Mihael Koep Date: Wed, 12 Sep 2012 17:59:05 +0200 Subject: Start implementing gain property. --- src/cameras/uca-dexela-camera.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/cameras/uca-dexela-camera.c b/src/cameras/uca-dexela-camera.c index ca6781b..436bea6 100644 --- a/src/cameras/uca-dexela-camera.c +++ b/src/cameras/uca-dexela-camera.c @@ -33,7 +33,8 @@ GQuark uca_dexela_camera_error_quark() } enum { - N_PROPERTIES = N_BASE_PROPERTIES, + PROP_GAIN_MODE = N_BASE_PROPERTIES, + N_PROPERTIES }; static gint base_overrideables[] = { @@ -173,6 +174,10 @@ static void uca_dexela_camera_get_property(GObject *object, guint property_id, G g_value_set_boxed(value, priv->binnings); break; } + case PROP_SENSOR_MAX_FRAME_RATE: + // TODO: we do not know how to compute the correct value, so just return 0 for now + g_value_set_float(value, 0.0f); + break; default: { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); @@ -266,6 +271,11 @@ static void uca_dexela_camera_class_init(UcaDexelaCameraClass *klass) for (guint i = 0; base_overrideables[i] != 0; i++) { g_object_class_override_property(gobject_class, base_overrideables[i], uca_camera_props[base_overrideables[i]]); } + dexela_properties[PROP_GAIN_MODE] = + g_param_spec_uint("gain-mode", + "High or Low Full Well", + "High (1) or Low (0) Full Well", + 0, 1, 0, G_PARAM_READWRITE); for (guint id = N_BASE_PROPERTIES; id < N_PROPERTIES; id++) { g_object_class_install_property(gobject_class, id, dexela_properties[id]); } -- cgit v1.2.3 From 12a110995cd7d5aeffe363ca8dfbe5c4f7be0de0 Mon Sep 17 00:00:00 2001 From: Mihael Koep Date: Thu, 13 Sep 2012 12:00:03 +0200 Subject: Implement gain and trigger mode properties. --- src/cameras/uca-dexela-camera.c | 66 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) (limited to 'src') diff --git a/src/cameras/uca-dexela-camera.c b/src/cameras/uca-dexela-camera.c index 436bea6..52b8b47 100644 --- a/src/cameras/uca-dexela-camera.c +++ b/src/cameras/uca-dexela-camera.c @@ -85,6 +85,41 @@ static void fill_binnings(UcaDexelaCameraPrivate *priv) g_value_array_append(priv->binnings, &val); } +static void map_dexela_trigger_mode_to_uca(GValue* value, TriggerMode mode) +{ + if (mode == SOFTWARE) { + g_value_set_enum(value, UCA_CAMERA_TRIGGER_INTERNAL); + return; + } + if (mode == EDGE) { + g_value_set_enum(value, UCA_CAMERA_TRIGGER_EXTERNAL); + return; + } + // XXX: this mapping is only a hack/guess + if (mode == DURATION) { + g_value_set_enum(value, UCA_CAMERA_TRIGGER_AUTO); + return; + } + g_warning("Unsupported dexela trigger mode: %d", mode); +} + +static void set_trigger_mode(UcaCameraTrigger mode) +{ + if (mode == UCA_CAMERA_TRIGGER_INTERNAL) { + setTriggerMode(SOFTWARE); + return; + } + if (mode == UCA_CAMERA_TRIGGER_EXTERNAL) { + setTriggerMode(EDGE); + return; + } + if (mode == UCA_CAMERA_TRIGGER_AUTO) { + setTriggerMode(DURATION); + return; + } + g_warning("Unsupported uca trigger mode: %d", mode); +} + static gboolean is_binning_allowed(UcaDexelaCameraPrivate *priv, guint binning) { for (int i = 0; i < priv->binnings->n_values; i++) { @@ -175,9 +210,21 @@ static void uca_dexela_camera_get_property(GObject *object, guint property_id, G break; } case PROP_SENSOR_MAX_FRAME_RATE: + { // TODO: we do not know how to compute the correct value, so just return 0 for now g_value_set_float(value, 0.0f); break; + } + case PROP_GAIN_MODE: + { + g_value_set_uint(value, getGain()); + break; + } + case PROP_TRIGGER_MODE: + { + map_dexela_trigger_mode_to_uca(value, getTriggerMode()); + break; + } default: { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); @@ -217,6 +264,25 @@ static void uca_dexela_camera_set_property(GObject *object, guint property_id, c setBinningMode(getBinningModeHorizontal(), verticalBinning); break; } + case PROP_GAIN_MODE: + { + const guint gain = g_value_get_uint(value); + if (gain == 0) { + setGain(LOW); + return; + } + if (gain == 1) { + setGain(HIGH); + return; + } + g_warning("Illegal attempt to set gain: %d", gain); + break; + } + case PROP_TRIGGER_MODE: + { + set_trigger_mode(g_value_get_enum(value)); + break; + } default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); return; -- cgit v1.2.3 From 39ac718975bfa7ef4ccf9b9fb2e85aed4f32ea34 Mon Sep 17 00:00:00 2001 From: Mihael Koep Date: Thu, 13 Sep 2012 17:08:42 +0200 Subject: Work on acquisition. --- src/cameras/uca-dexela-camera.c | 42 +++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/cameras/uca-dexela-camera.c b/src/cameras/uca-dexela-camera.c index 52b8b47..53c59c1 100644 --- a/src/cameras/uca-dexela-camera.c +++ b/src/cameras/uca-dexela-camera.c @@ -66,6 +66,10 @@ static const gdouble MICROS_TO_SECONDS_FACTOR = 10e6d; struct _UcaDexelaCameraPrivate { GValueArray *binnings; + guint width; + guint height; + guint bits; + gsize num_bytes; }; /** @@ -144,6 +148,10 @@ UcaDexelaCamera *uca_dexela_camera_new(GError **error) // TODO implement error checking openDetector("/usr/share/dexela/dexela-1207_32.fmt"); initSerialConnection(); + priv->bits = getBitDepth(); + priv->width = getWidth(); + priv->height = getHeight(); + priv->num_bytes = 2; return camera; } @@ -176,17 +184,17 @@ static void uca_dexela_camera_get_property(GObject *object, guint property_id, G } case PROP_SENSOR_BITDEPTH: { - g_value_set_uint(value, getBitDepth()); + g_value_set_uint(value, priv->bits); break; } case PROP_SENSOR_WIDTH: { - g_value_set_uint(value, getWidth()); + g_value_set_uint(value, priv->width); break; } case PROP_SENSOR_HEIGHT: { - g_value_set_uint(value, getHeight()); + g_value_set_uint(value, priv->height); break; } case PROP_SENSOR_HORIZONTAL_BINNING: @@ -292,31 +300,35 @@ static void uca_dexela_camera_set_property(GObject *object, guint property_id, c static void uca_dexela_camera_start_recording(UcaCamera *camera, GError **error) { g_debug("start recording called"); + dexela_start_acquisition(); } static void uca_dexela_camera_stop_recording(UcaCamera *camera, GError **error) { g_debug("stop recording called"); -} - -static void uca_dexela_camera_start_readout(UcaCamera *camera, GError **error) -{ - g_debug("start readout called"); -} - -static void uca_dexela_camera_trigger(UcaCamera *camera, GError **error) -{ - g_debug("trigger called"); + dexela_stop_acquisition(); } static void uca_dexela_camera_grab(UcaCamera *camera, gpointer *data, GError **error) { g_debug("grab called"); + g_return_if_fail(UCA_IS_DEXELA_CAMERA(camera)); + UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(camera); + g_debug("Data-pointer: %p, %p", data, *data); + if (*data == NULL) { + g_debug("Allocating buffer"); + *data = g_malloc0(priv->width * priv->height * priv->num_bytes); + } + // TODO: fetch image from libdexela + // TODO: copy to the data buffer + memcpy((gchar *) *data, dexela_grab(), priv->width * priv->height * priv->num_bytes); } static void uca_dexela_camera_finalize(GObject *object) { - //UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(object); + UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(object); + g_value_array_free(priv->binnings); + G_OBJECT_CLASS(uca_dexela_camera_parent_class)->finalize(object); } @@ -330,8 +342,6 @@ static void uca_dexela_camera_class_init(UcaDexelaCameraClass *klass) UcaCameraClass *camera_class = UCA_CAMERA_CLASS(klass); camera_class->start_recording = uca_dexela_camera_start_recording; camera_class->stop_recording = uca_dexela_camera_stop_recording; - camera_class->start_readout = uca_dexela_camera_start_readout; - camera_class->trigger = uca_dexela_camera_trigger; camera_class->grab = uca_dexela_camera_grab; for (guint i = 0; base_overrideables[i] != 0; i++) { -- cgit v1.2.3 From 77516f3ec1403c7b2beaf8d5a998472faec7d553 Mon Sep 17 00:00:00 2001 From: Mihael Koep Date: Thu, 13 Sep 2012 17:37:36 +0200 Subject: Adapt to new libdexela interface. --- src/cameras/uca-dexela-camera.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/cameras/uca-dexela-camera.c b/src/cameras/uca-dexela-camera.c index 53c59c1..4671168 100644 --- a/src/cameras/uca-dexela-camera.c +++ b/src/cameras/uca-dexela-camera.c @@ -110,15 +110,15 @@ static void map_dexela_trigger_mode_to_uca(GValue* value, TriggerMode mode) static void set_trigger_mode(UcaCameraTrigger mode) { if (mode == UCA_CAMERA_TRIGGER_INTERNAL) { - setTriggerMode(SOFTWARE); + dexela_set_trigger_mode(SOFTWARE); return; } if (mode == UCA_CAMERA_TRIGGER_EXTERNAL) { - setTriggerMode(EDGE); + dexela_set_trigger_mode(EDGE); return; } if (mode == UCA_CAMERA_TRIGGER_AUTO) { - setTriggerMode(DURATION); + dexela_set_trigger_mode(DURATION); return; } g_warning("Unsupported uca trigger mode: %d", mode); @@ -146,11 +146,11 @@ UcaDexelaCamera *uca_dexela_camera_new(GError **error) */ GObjectClass *camera_class = G_OBJECT_CLASS (UCA_CAMERA_GET_CLASS (camera)); // TODO implement error checking - openDetector("/usr/share/dexela/dexela-1207_32.fmt"); - initSerialConnection(); - priv->bits = getBitDepth(); - priv->width = getWidth(); - priv->height = getHeight(); + dexela_open_detector("/usr/share/dexela/dexela-1207_32.fmt"); + dexela_init_serial_connection(); + priv->bits = dexela_get_bit_depth(); + priv->width = dexela_get_width(); + priv->height = dexela_get_height(); priv->num_bytes = 2; return camera; } @@ -162,14 +162,14 @@ static void uca_dexela_camera_get_property(GObject *object, guint property_id, G switch (property_id) { case PROP_NAME: { - gchar* model = getModel(); + gchar* model = dexela_get_model(); g_value_set_string(value, g_strdup_printf("Dexela %s", model)); g_free(model); break; } case PROP_EXPOSURE_TIME: { - g_value_set_double(value, getExposureTimeMicros() / MICROS_TO_SECONDS_FACTOR); + g_value_set_double(value, dexela_get_exposure_time_micros() / MICROS_TO_SECONDS_FACTOR); break; } case PROP_HAS_CAMRAM_RECORDING: @@ -199,7 +199,7 @@ static void uca_dexela_camera_get_property(GObject *object, guint property_id, G } case PROP_SENSOR_HORIZONTAL_BINNING: { - g_value_set_uint(value, getBinningModeHorizontal()); + g_value_set_uint(value, dexela_get_binning_mode_horizontal()); break; } case PROP_SENSOR_HORIZONTAL_BINNINGS: @@ -209,7 +209,7 @@ static void uca_dexela_camera_get_property(GObject *object, guint property_id, G } case PROP_SENSOR_VERTICAL_BINNING: { - g_value_set_uint(value, getBinningModeVertical()); + g_value_set_uint(value, dexela_get_binning_mode_vertical()); break; } case PROP_SENSOR_VERTICAL_BINNINGS: @@ -225,12 +225,12 @@ static void uca_dexela_camera_get_property(GObject *object, guint property_id, G } case PROP_GAIN_MODE: { - g_value_set_uint(value, getGain()); + g_value_set_uint(value, dexela_get_gain()); break; } case PROP_TRIGGER_MODE: { - map_dexela_trigger_mode_to_uca(value, getTriggerMode()); + map_dexela_trigger_mode_to_uca(value, dexela_get_trigger_mode()); break; } default: @@ -249,7 +249,7 @@ static void uca_dexela_camera_set_property(GObject *object, guint property_id, c case PROP_EXPOSURE_TIME: { const gdouble exposureTimeInSeconds = g_value_get_double(value); - setExposureTimeMicros(exposureTimeInSeconds * MICROS_TO_SECONDS_FACTOR); + dexela_set_exposure_time_micros(exposureTimeInSeconds * MICROS_TO_SECONDS_FACTOR); break; } case PROP_SENSOR_HORIZONTAL_BINNING: @@ -259,7 +259,7 @@ static void uca_dexela_camera_set_property(GObject *object, guint property_id, c g_warning("Tried to set illegal horizontal binning: %d", horizontalBinning); return; } - setBinningMode(horizontalBinning, getBinningModeVertical()); + dexela_set_binning_mode(horizontalBinning, dexela_get_binning_mode_vertical()); break; } case PROP_SENSOR_VERTICAL_BINNING: @@ -269,18 +269,18 @@ static void uca_dexela_camera_set_property(GObject *object, guint property_id, c g_warning("Tried to set illegal vertical binning: %d", verticalBinning); return; } - setBinningMode(getBinningModeHorizontal(), verticalBinning); + dexela_set_binning_mode(dexela_get_binning_mode_horizontal(), verticalBinning); break; } case PROP_GAIN_MODE: { const guint gain = g_value_get_uint(value); if (gain == 0) { - setGain(LOW); + dexela_set_gain(LOW); return; } if (gain == 1) { - setGain(HIGH); + dexela_set_gain(HIGH); return; } g_warning("Illegal attempt to set gain: %d", gain); -- cgit v1.2.3 From 7d8d5904eb7423a26a37cd3b0b69a7bd0cb59ab8 Mon Sep 17 00:00:00 2001 From: Mihael Koep Date: Tue, 18 Sep 2012 14:11:14 +0200 Subject: Return full dimensions as roi. --- src/cameras/uca-dexela-camera.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src') diff --git a/src/cameras/uca-dexela-camera.c b/src/cameras/uca-dexela-camera.c index 4671168..21b13b2 100644 --- a/src/cameras/uca-dexela-camera.c +++ b/src/cameras/uca-dexela-camera.c @@ -15,6 +15,7 @@ with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA */ +#include #include "uca-camera.h" #include "uca-dexela-camera.h" #include "uca-enums.h" @@ -197,6 +198,18 @@ static void uca_dexela_camera_get_property(GObject *object, guint property_id, G g_value_set_uint(value, priv->height); break; } + case PROP_ROI_WIDTH: + { + // use full frame for now + g_value_set_uint(value, priv->width); + break; + } + case PROP_ROI_HEIGHT: + { + // use full frame for now + g_value_set_uint(value, priv->height); + break; + } case PROP_SENSOR_HORIZONTAL_BINNING: { g_value_set_uint(value, dexela_get_binning_mode_horizontal()); -- cgit v1.2.3 From 5783156882cde177cd6c2f7e06451e8e0444e666 Mon Sep 17 00:00:00 2001 From: Mihael Koep Date: Tue, 9 Oct 2012 14:18:28 +0200 Subject: Add test mode attribute. --- src/cameras/uca-dexela-camera.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src') diff --git a/src/cameras/uca-dexela-camera.c b/src/cameras/uca-dexela-camera.c index 21b13b2..13e8b05 100644 --- a/src/cameras/uca-dexela-camera.c +++ b/src/cameras/uca-dexela-camera.c @@ -35,6 +35,7 @@ GQuark uca_dexela_camera_error_quark() enum { PROP_GAIN_MODE = N_BASE_PROPERTIES, + PROP_TEST_MODE, N_PROPERTIES }; @@ -241,6 +242,11 @@ static void uca_dexela_camera_get_property(GObject *object, guint property_id, G g_value_set_uint(value, dexela_get_gain()); break; } + case PROP_TEST_MODE: + { + g_value_set_boolean(value, dexela_get_control_register() & 1); + break; + } case PROP_TRIGGER_MODE: { map_dexela_trigger_mode_to_uca(value, dexela_get_trigger_mode()); @@ -299,6 +305,15 @@ static void uca_dexela_camera_set_property(GObject *object, guint property_id, c g_warning("Illegal attempt to set gain: %d", gain); break; } + case PROP_TEST_MODE: + { + if (g_value_get_boolean(value)) { + dexela_set_control_register(dexela_get_control_register() | 1); + return; + } + dexela_set_control_register(dexela_get_control_register() & 0xFFFE); + break; + } case PROP_TRIGGER_MODE: { set_trigger_mode(g_value_get_enum(value)); @@ -365,6 +380,11 @@ static void uca_dexela_camera_class_init(UcaDexelaCameraClass *klass) "High or Low Full Well", "High (1) or Low (0) Full Well", 0, 1, 0, G_PARAM_READWRITE); + dexela_properties[PROP_TEST_MODE] = + g_param_spec_boolean("test-mode", + "Enable or disable test mode", + "Enable (true) or disable (false) test mode", + FALSE, G_PARAM_READWRITE); for (guint id = N_BASE_PROPERTIES; id < N_PROPERTIES; id++) { g_object_class_install_property(gobject_class, id, dexela_properties[id]); } -- cgit v1.2.3 From b73c7a9550a39566b881244d95cd0cb2a97e82b3 Mon Sep 17 00:00:00 2001 From: Mihael Koep Date: Tue, 9 Oct 2012 14:20:11 +0200 Subject: fix SCHNEIDE-382: use correct micros to seconds factor. --- src/cameras/uca-dexela-camera.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/cameras/uca-dexela-camera.c b/src/cameras/uca-dexela-camera.c index 13e8b05..7ec96e6 100644 --- a/src/cameras/uca-dexela-camera.c +++ b/src/cameras/uca-dexela-camera.c @@ -64,7 +64,7 @@ static gint base_overrideables[] = { static GParamSpec *dexela_properties[N_PROPERTIES] = { NULL, }; -static const gdouble MICROS_TO_SECONDS_FACTOR = 10e6d; +static const gdouble MICROS_TO_SECONDS_FACTOR = 1e6d; struct _UcaDexelaCameraPrivate { GValueArray *binnings; @@ -268,7 +268,7 @@ static void uca_dexela_camera_set_property(GObject *object, guint property_id, c case PROP_EXPOSURE_TIME: { const gdouble exposureTimeInSeconds = g_value_get_double(value); - dexela_set_exposure_time_micros(exposureTimeInSeconds * MICROS_TO_SECONDS_FACTOR); + dexela_set_exposure_time_micros((gint) (exposureTimeInSeconds * MICROS_TO_SECONDS_FACTOR)); break; } case PROP_SENSOR_HORIZONTAL_BINNING: @@ -342,12 +342,10 @@ static void uca_dexela_camera_grab(UcaCamera *camera, gpointer *data, GError **e g_debug("grab called"); g_return_if_fail(UCA_IS_DEXELA_CAMERA(camera)); UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(camera); - g_debug("Data-pointer: %p, %p", data, *data); if (*data == NULL) { g_debug("Allocating buffer"); *data = g_malloc0(priv->width * priv->height * priv->num_bytes); } - // TODO: fetch image from libdexela // TODO: copy to the data buffer memcpy((gchar *) *data, dexela_grab(), priv->width * priv->height * priv->num_bytes); } -- cgit v1.2.3 From 9c6732c05f35bb06f92593b46990473aa7a0f799 Mon Sep 17 00:00:00 2001 From: Mihael Koep Date: Thu, 25 Oct 2012 17:44:00 +0200 Subject: Start migrating to libuca 1.1 and glib plugins. --- src/cameras/uca-dexela-camera.c | 395 ---------------------------------------- src/cameras/uca-dexela-camera.h | 68 ------- src/config.h.in | 3 +- 3 files changed, 2 insertions(+), 464 deletions(-) delete mode 100644 src/cameras/uca-dexela-camera.c delete mode 100644 src/cameras/uca-dexela-camera.h (limited to 'src') diff --git a/src/cameras/uca-dexela-camera.c b/src/cameras/uca-dexela-camera.c deleted file mode 100644 index 7ec96e6..0000000 --- a/src/cameras/uca-dexela-camera.c +++ /dev/null @@ -1,395 +0,0 @@ -/* Copyright (C) 2011, 2012 Mihael Koep - (Softwareschneiderei GmbH) - - This library is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by the - Free Software Foundation; either version 2.1 of the License, or (at your - option) any later version. - - This library is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - details. - - You should have received a copy of the GNU Lesser General Public License along - with this library; if not, write to the Free Software Foundation, Inc., 51 - Franklin St, Fifth Floor, Boston, MA 02110, USA */ - -#include -#include "uca-camera.h" -#include "uca-dexela-camera.h" -#include "uca-enums.h" -#include "dexela_api.h" - -#define UCA_DEXELA_CAMERA_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), UCA_TYPE_DEXELA_CAMERA, UcaDexelaCameraPrivate)) - -G_DEFINE_TYPE(UcaDexelaCamera, uca_dexela_camera, UCA_TYPE_CAMERA) -/** - * UcaDexelaCameraError: - * @UCA_DEXELA_CAMERA_ERROR_LIBDEXELA_INIT: Initializing libdexela failed - */ -GQuark uca_dexela_camera_error_quark() -{ - return g_quark_from_static_string("uca-dexela-camera-error-quark"); -} - -enum { - PROP_GAIN_MODE = N_BASE_PROPERTIES, - PROP_TEST_MODE, - N_PROPERTIES -}; - -static gint base_overrideables[] = { - PROP_NAME, - PROP_SENSOR_WIDTH, - PROP_SENSOR_HEIGHT, - PROP_SENSOR_BITDEPTH, - PROP_SENSOR_HORIZONTAL_BINNING, - PROP_SENSOR_HORIZONTAL_BINNINGS, - PROP_SENSOR_VERTICAL_BINNING, - PROP_SENSOR_VERTICAL_BINNINGS, - PROP_SENSOR_MAX_FRAME_RATE, - PROP_EXPOSURE_TIME, - PROP_TRIGGER_MODE, - PROP_ROI_X, - PROP_ROI_Y, - PROP_ROI_WIDTH, - PROP_ROI_HEIGHT, - PROP_ROI_WIDTH_MULTIPLIER, - PROP_ROI_HEIGHT_MULTIPLIER, - PROP_HAS_STREAMING, - PROP_HAS_CAMRAM_RECORDING, - 0 -}; - -static GParamSpec *dexela_properties[N_PROPERTIES] = { NULL, }; - -static const gdouble MICROS_TO_SECONDS_FACTOR = 1e6d; - -struct _UcaDexelaCameraPrivate { - GValueArray *binnings; - guint width; - guint height; - guint bits; - gsize num_bytes; -}; - -/** - * Hardcode possible binnings for now - */ -static void fill_binnings(UcaDexelaCameraPrivate *priv) -{ - GValue val = {0}; - g_value_init(&val, G_TYPE_UINT); - - priv->binnings = g_value_array_new(3); - g_value_set_uint(&val, 1); - g_value_array_append(priv->binnings, &val); - g_value_set_uint(&val, 2); - g_value_array_append(priv->binnings, &val); - g_value_set_uint(&val, 4); - g_value_array_append(priv->binnings, &val); -} - -static void map_dexela_trigger_mode_to_uca(GValue* value, TriggerMode mode) -{ - if (mode == SOFTWARE) { - g_value_set_enum(value, UCA_CAMERA_TRIGGER_INTERNAL); - return; - } - if (mode == EDGE) { - g_value_set_enum(value, UCA_CAMERA_TRIGGER_EXTERNAL); - return; - } - // XXX: this mapping is only a hack/guess - if (mode == DURATION) { - g_value_set_enum(value, UCA_CAMERA_TRIGGER_AUTO); - return; - } - g_warning("Unsupported dexela trigger mode: %d", mode); -} - -static void set_trigger_mode(UcaCameraTrigger mode) -{ - if (mode == UCA_CAMERA_TRIGGER_INTERNAL) { - dexela_set_trigger_mode(SOFTWARE); - return; - } - if (mode == UCA_CAMERA_TRIGGER_EXTERNAL) { - dexela_set_trigger_mode(EDGE); - return; - } - if (mode == UCA_CAMERA_TRIGGER_AUTO) { - dexela_set_trigger_mode(DURATION); - return; - } - g_warning("Unsupported uca trigger mode: %d", mode); -} - -static gboolean is_binning_allowed(UcaDexelaCameraPrivate *priv, guint binning) -{ - for (int i = 0; i < priv->binnings->n_values; i++) { - guint allowedBinning = g_value_get_uint(g_value_array_get_nth(priv->binnings, i)); - if (binning == allowedBinning) { - return TRUE; - } - } - return FALSE; -} - -UcaDexelaCamera *uca_dexela_camera_new(GError **error) -{ - UcaDexelaCamera *camera = g_object_new(UCA_TYPE_DEXELA_CAMERA, NULL); - UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(camera); - fill_binnings(priv); - /* - * Here we override property ranges because we didn't know them at property - * installation time. - */ - GObjectClass *camera_class = G_OBJECT_CLASS (UCA_CAMERA_GET_CLASS (camera)); - // TODO implement error checking - dexela_open_detector("/usr/share/dexela/dexela-1207_32.fmt"); - dexela_init_serial_connection(); - priv->bits = dexela_get_bit_depth(); - priv->width = dexela_get_width(); - priv->height = dexela_get_height(); - priv->num_bytes = 2; - return camera; -} - -static void uca_dexela_camera_get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) -{ - UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(object); - - switch (property_id) { - case PROP_NAME: - { - gchar* model = dexela_get_model(); - g_value_set_string(value, g_strdup_printf("Dexela %s", model)); - g_free(model); - break; - } - case PROP_EXPOSURE_TIME: - { - g_value_set_double(value, dexela_get_exposure_time_micros() / MICROS_TO_SECONDS_FACTOR); - break; - } - case PROP_HAS_CAMRAM_RECORDING: - { - g_value_set_boolean(value, FALSE); - break; - } - case PROP_HAS_STREAMING: - { - g_value_set_boolean(value, FALSE); - break; - } - case PROP_SENSOR_BITDEPTH: - { - g_value_set_uint(value, priv->bits); - break; - } - case PROP_SENSOR_WIDTH: - { - g_value_set_uint(value, priv->width); - break; - } - case PROP_SENSOR_HEIGHT: - { - g_value_set_uint(value, priv->height); - break; - } - case PROP_ROI_WIDTH: - { - // use full frame for now - g_value_set_uint(value, priv->width); - break; - } - case PROP_ROI_HEIGHT: - { - // use full frame for now - g_value_set_uint(value, priv->height); - break; - } - case PROP_SENSOR_HORIZONTAL_BINNING: - { - g_value_set_uint(value, dexela_get_binning_mode_horizontal()); - break; - } - case PROP_SENSOR_HORIZONTAL_BINNINGS: - { - g_value_set_boxed(value, priv->binnings); - break; - } - case PROP_SENSOR_VERTICAL_BINNING: - { - g_value_set_uint(value, dexela_get_binning_mode_vertical()); - break; - } - case PROP_SENSOR_VERTICAL_BINNINGS: - { - g_value_set_boxed(value, priv->binnings); - break; - } - case PROP_SENSOR_MAX_FRAME_RATE: - { - // TODO: we do not know how to compute the correct value, so just return 0 for now - g_value_set_float(value, 0.0f); - break; - } - case PROP_GAIN_MODE: - { - g_value_set_uint(value, dexela_get_gain()); - break; - } - case PROP_TEST_MODE: - { - g_value_set_boolean(value, dexela_get_control_register() & 1); - break; - } - case PROP_TRIGGER_MODE: - { - map_dexela_trigger_mode_to_uca(value, dexela_get_trigger_mode()); - break; - } - default: - { - G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); - break; - } - } -} - -static void uca_dexela_camera_set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) -{ - UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(object); - - switch (property_id) { - case PROP_EXPOSURE_TIME: - { - const gdouble exposureTimeInSeconds = g_value_get_double(value); - dexela_set_exposure_time_micros((gint) (exposureTimeInSeconds * MICROS_TO_SECONDS_FACTOR)); - break; - } - case PROP_SENSOR_HORIZONTAL_BINNING: - { - const guint horizontalBinning = g_value_get_uint(value); - if (!is_binning_allowed(priv, horizontalBinning)) { - g_warning("Tried to set illegal horizontal binning: %d", horizontalBinning); - return; - } - dexela_set_binning_mode(horizontalBinning, dexela_get_binning_mode_vertical()); - break; - } - case PROP_SENSOR_VERTICAL_BINNING: - { - const guint verticalBinning = g_value_get_uint(value); - if (!is_binning_allowed(priv, verticalBinning)) { - g_warning("Tried to set illegal vertical binning: %d", verticalBinning); - return; - } - dexela_set_binning_mode(dexela_get_binning_mode_horizontal(), verticalBinning); - break; - } - case PROP_GAIN_MODE: - { - const guint gain = g_value_get_uint(value); - if (gain == 0) { - dexela_set_gain(LOW); - return; - } - if (gain == 1) { - dexela_set_gain(HIGH); - return; - } - g_warning("Illegal attempt to set gain: %d", gain); - break; - } - case PROP_TEST_MODE: - { - if (g_value_get_boolean(value)) { - dexela_set_control_register(dexela_get_control_register() | 1); - return; - } - dexela_set_control_register(dexela_get_control_register() & 0xFFFE); - break; - } - case PROP_TRIGGER_MODE: - { - set_trigger_mode(g_value_get_enum(value)); - break; - } - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); - return; - } -} - -static void uca_dexela_camera_start_recording(UcaCamera *camera, GError **error) -{ - g_debug("start recording called"); - dexela_start_acquisition(); -} - -static void uca_dexela_camera_stop_recording(UcaCamera *camera, GError **error) -{ - g_debug("stop recording called"); - dexela_stop_acquisition(); -} - -static void uca_dexela_camera_grab(UcaCamera *camera, gpointer *data, GError **error) -{ - g_debug("grab called"); - g_return_if_fail(UCA_IS_DEXELA_CAMERA(camera)); - UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(camera); - if (*data == NULL) { - g_debug("Allocating buffer"); - *data = g_malloc0(priv->width * priv->height * priv->num_bytes); - } - // TODO: copy to the data buffer - memcpy((gchar *) *data, dexela_grab(), priv->width * priv->height * priv->num_bytes); -} - -static void uca_dexela_camera_finalize(GObject *object) -{ - UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(object); - g_value_array_free(priv->binnings); - - G_OBJECT_CLASS(uca_dexela_camera_parent_class)->finalize(object); -} - -static void uca_dexela_camera_class_init(UcaDexelaCameraClass *klass) -{ - GObjectClass *gobject_class = G_OBJECT_CLASS(klass); - gobject_class->set_property = uca_dexela_camera_set_property; - gobject_class->get_property = uca_dexela_camera_get_property; - gobject_class->finalize = uca_dexela_camera_finalize; - - UcaCameraClass *camera_class = UCA_CAMERA_CLASS(klass); - camera_class->start_recording = uca_dexela_camera_start_recording; - camera_class->stop_recording = uca_dexela_camera_stop_recording; - camera_class->grab = uca_dexela_camera_grab; - - for (guint i = 0; base_overrideables[i] != 0; i++) { - g_object_class_override_property(gobject_class, base_overrideables[i], uca_camera_props[base_overrideables[i]]); - } - dexela_properties[PROP_GAIN_MODE] = - g_param_spec_uint("gain-mode", - "High or Low Full Well", - "High (1) or Low (0) Full Well", - 0, 1, 0, G_PARAM_READWRITE); - dexela_properties[PROP_TEST_MODE] = - g_param_spec_boolean("test-mode", - "Enable or disable test mode", - "Enable (true) or disable (false) test mode", - FALSE, G_PARAM_READWRITE); - for (guint id = N_BASE_PROPERTIES; id < N_PROPERTIES; id++) { - g_object_class_install_property(gobject_class, id, dexela_properties[id]); - } - g_type_class_add_private(klass, sizeof(UcaDexelaCameraPrivate)); -} - -static void uca_dexela_camera_init(UcaDexelaCamera *self) -{ - self->priv = UCA_DEXELA_CAMERA_GET_PRIVATE(self); -} diff --git a/src/cameras/uca-dexela-camera.h b/src/cameras/uca-dexela-camera.h deleted file mode 100644 index 9badf10..0000000 --- a/src/cameras/uca-dexela-camera.h +++ /dev/null @@ -1,68 +0,0 @@ -/* Copyright (C) 2011, 2012 Mihael Koep - (Softwareschneiderei GmbH) - - This library is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by the - Free Software Foundation; either version 2.1 of the License, or (at your - option) any later version. - - This library is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - details. - - You should have received a copy of the GNU Lesser General Public License along - with this library; if not, write to the Free Software Foundation, Inc., 51 - Franklin St, Fifth Floor, Boston, MA 02110, USA */ - -#ifndef __UCA_DEXELA_CAMERA_H -#define __UCA_DEXELA_CAMERA_H - -#include -#include "uca-camera.h" - -#define UCA_TYPE_DEXELA_CAMERA (uca_dexela_camera_get_type()) -#define UCA_DEXELA_CAMERA(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), UCA_TYPE_DEXELA_CAMERA, UcaDexelaCamera)) -#define UCA_IS_DEXELA_CAMERA(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), UCA_TYPE_DEXELA_CAMERA)) -#define UCA_DEXELA_CAMERA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), UCA_TYPE_DEXELA_CAMERA, UcaDexelaCameraClass)) -#define UCA_IS_DEXELA_CAMERA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), UCA_TYPE_DEXELA_CAMERA)) -#define UCA_DEXELA_CAMERA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), UCA_TYPE_DEXELA_CAMERA, UcaDexelaCameraClass)) - -#define UCA_DEXELA_CAMERA_ERROR uca_dexela_camera_error_quark() -typedef enum { - UCA_DEXELA_CAMERA_ERROR_LIBPCO_INIT, -} UcaDexelaCameraError; - -typedef struct _UcaDexelaCamera UcaDexelaCamera; -typedef struct _UcaDexelaCameraClass UcaDexelaCameraClass; -typedef struct _UcaDexelaCameraPrivate UcaDexelaCameraPrivate; - -/** - * UcaDexelaCamera: - * - * Creates #UcaDexelaCamera instances by loading corresponding shared objects. The - * contents of the #UcaDexelaCamera structure are private and should only be - * accessed via the provided API. - */ -struct _UcaDexelaCamera { - /*< private >*/ - UcaCamera parent; - - UcaDexelaCameraPrivate *priv; -}; - -/** - * UcaDexelaCameraClass: - * - * #UcaDexelaCamera class - */ -struct _UcaDexelaCameraClass { - /*< private >*/ - UcaCameraClass parent; -}; - -UcaDexelaCamera *uca_dexela_camera_new(GError **error); - -GType uca_dexela_camera_get_type(void); - -#endif diff --git a/src/config.h.in b/src/config.h.in index ec1fb62..d16158b 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -6,4 +6,5 @@ #cmakedefine HAVE_DEXELA_CL #cmakedefine HAVE_MOCK_CAMERA -#define CONTROL_GLADE_PATH "${CMAKE_INSTALL_PREFIX}/share/libuca/control.glade" +//#define CONTROL_GLADE_PATH "${CMAKE_INSTALL_PREFIX}/share/libuca/control.glade" +#define CONTROL_GLADE_PATH "./control.glade" -- cgit v1.2.3