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 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'ipecamera/image.c') 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); -- cgit v1.2.3