summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2012-04-20 11:00:32 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2012-04-20 11:00:32 +0200
commit025dfc0c41367d5b29381e6ab26d3d58fe75d931 (patch)
tree818390e2b089a63606f61f953df283690d185280
parent1b019c9b661c4dc23fbba4af7659745570ec7473 (diff)
downloaduca-025dfc0c41367d5b29381e6ab26d3d58fe75d931.tar.gz
uca-025dfc0c41367d5b29381e6ab26d3d58fe75d931.tar.bz2
uca-025dfc0c41367d5b29381e6ab26d3d58fe75d931.tar.xz
uca-025dfc0c41367d5b29381e6ab26d3d58fe75d931.zip
Leave properties for later
-rw-r--r--cmake/FindPF.cmake3
-rw-r--r--src/cameras/uca-pf-camera.c44
-rw-r--r--test/control.c2
3 files changed, 15 insertions, 34 deletions
diff --git a/cmake/FindPF.cmake b/cmake/FindPF.cmake
index 7c87a50..926bea7 100644
--- a/cmake/FindPF.cmake
+++ b/cmake/FindPF.cmake
@@ -16,9 +16,6 @@ find_library(PF_LIBRARY_PFCAM NAMES pfcam)
set(PF_LIBRARIES
${PF_LIBRARY_MV2}
- ${PF_LIBRARY_PFCAM}
- ${PF_LIBRARY_COMDLL}
- ${PF_LIBRARY_COMDLL_FG}
)
find_package_handle_standard_args(PF DEFAULT_MSG PF_LIBRARIES PF_INCLUDE_DIRS)
diff --git a/src/cameras/uca-pf-camera.c b/src/cameras/uca-pf-camera.c
index 2724aa5..3bbd406 100644
--- a/src/cameras/uca-pf-camera.c
+++ b/src/cameras/uca-pf-camera.c
@@ -104,36 +104,20 @@ UcaPfCamera *uca_pf_camera_new(GError **error)
static const int camera_link_type = FG_CL_8BIT_FULL_8;
static const int camera_format = FG_GRAY;
- /* gint num_ports; */
- /* if (pfPortInit(&num_ports) < 0) { */
- /* g_set_error(error, UCA_PF_CAMERA_ERROR, UCA_PF_CAMERA_ERROR_INIT, */
- /* "Could not initialize ports"); */
- /* return NULL; */
- /* } */
-
- /* g_print("We have %i ports\n", num_ports); */
- /* gchar vendor[256]; */
- /* gint vendor_size; */
- /* gchar name[256]; */
- /* gint name_size; */
- /* int version, type; */
- /* for (guint i = 0; i < num_ports; i++) { */
- /* int result = pfPortInfo(i, vendor, &vendor_size, name, &name_size, &version, &type); */
- /* if (result < 0) { */
- /* g_print("[%i] could not retrieve information\n", i); */
- /* } */
- /* else { */
- /* int baudrate; */
- /* pfGetBaudRate(i, &baudrate); */
- /* g_print("[%i] %s %s %i %i at %i bps\n", i, vendor, name, version, type, baudrate); */
- /* } */
- /* } */
-
- /* if (pfDeviceOpen(0) != 0) { */
- /* g_set_error(error, UCA_PF_CAMERA_ERROR, UCA_PF_CAMERA_ERROR_INIT, */
- /* "Could not open device"); */
- /* return NULL; */
- /* } */
+ /*
+ gint num_ports;
+ if (pfPortInit(&num_ports) < 0) {
+ g_set_error(error, UCA_PF_CAMERA_ERROR, UCA_PF_CAMERA_ERROR_INIT,
+ "Could not initialize ports");
+ return NULL;
+ }
+
+ if (pfDeviceOpen(0) < 0) {
+ g_set_error(error, UCA_PF_CAMERA_ERROR, UCA_PF_CAMERA_ERROR_INIT,
+ "Could not open device");
+ return NULL;
+ }
+ */
UcaPfCamera *camera = g_object_new(UCA_TYPE_PF_CAMERA, NULL);
UcaPfCameraPrivate *priv = UCA_PF_CAMERA_GET_PRIVATE(camera);
diff --git a/test/control.c b/test/control.c
index a5a4e22..4990e5e 100644
--- a/test/control.c
+++ b/test/control.c
@@ -339,7 +339,7 @@ static void create_main_window(GtkBuilder *builder, const gchar* camera_name)
GError *error = NULL;
UcaCamera *camera = uca_camera_new(camera_name, &error);
- if (error != NULL) {
+ if ((camera == NULL) || (error != NULL)) {
g_error("%s\n", error->message);
gtk_main_quit();
}