From 6880d3f07317d34af6f30515acea128bb19f84a3 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 27 Jul 2011 12:33:34 +0200 Subject: Disable debugging --- ipecamera/image.c | 11 ++++++++++- ipecamera/model.h | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'ipecamera') diff --git a/ipecamera/image.c b/ipecamera/image.c index 0f6afb4..0e4a849 100644 --- a/ipecamera/image.c +++ b/ipecamera/image.c @@ -662,17 +662,26 @@ static int ipecamera_get_image(ipecamera_t *ctx) { if (err == PCILIB_ERROR_TIMEOUT) { if (size > 0) err = 0; else { -// pcilib_error("There is no data received from IPE Camera"); +#ifdef IPECAMERA_DEBUG pcilib_warning("There is no data received from IPE Camera for lines: %i to %i", i, i + num_lines - 1); err = 0; SET_REG(control_reg, IPECAMERA_IDLE); continue; +#else /* IPECAMERA_DEBUG */ + pcilib_error("There is no data received from IPE Camera"); + return err; +#endif /* IPECAMERA_DEBUG */ } } else pcilib_error("DMA read from IPE Camera have failed"); } else if (!size) { +#ifdef IPECAMERA_DEBUG pcilib_warning("There is no data received from IPE Camera for lines: %i to %i", i, i + num_lines - 1); SET_REG(control_reg, IPECAMERA_IDLE); continue; +#else /* IPECAMERA_DEBUG */ + pcilib_warning("There is no data received from IPE Camera for lines: %i to %i", i, i + num_lines - 1); + return err; +#endif /* IPECAMERA_DEBUG */ } pcilib_warning("Reading lines %i to %i: got %i bytes from DMA", i, i + num_lines - 1, size); diff --git a/ipecamera/model.h b/ipecamera/model.h index c102e41..2dec30a 100644 --- a/ipecamera/model.h +++ b/ipecamera/model.h @@ -6,7 +6,7 @@ #include "pcilib.h" #include "image.h" -#define IPECAMERA_DEBUG +//#define IPECAMERA_DEBUG #define IPECAMERA_DMA_R3 #define IPECAMERA_DMA_ADDRESS 1 -- cgit v1.2.3