From b3ab9c28bd520c2ba3eff3a9964387232bee0762 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Fri, 21 Oct 2016 14:41:24 +0200 Subject: [PATCH] build in DEBUG mode --- camlibs/pentax/pslr.c | 2 +- camlibs/sonydscf1/command.c | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/camlibs/pentax/pslr.c b/camlibs/pentax/pslr.c index 25abeb06f..782364be7 100644 --- a/camlibs/pentax/pslr.c +++ b/camlibs/pentax/pslr.c @@ -1021,7 +1021,7 @@ static int ipslr_press_shutter(ipslr_handle_t *p) CHECK(ipslr_write_args(p, 1, 2)); CHECK(command(p, 0x10, 0x05, 0x04)); get_status(p); - DPRINT("shutter result code: 0x%x\n", r); + DPRINT("shutter result code: 0x%x\n", p->status); return PSLR_OK; } diff --git a/camlibs/sonydscf1/command.c b/camlibs/sonydscf1/command.c index 9966d5a5d..b70b9ca0d 100644 --- a/camlibs/sonydscf1/command.c +++ b/camlibs/sonydscf1/command.c @@ -144,7 +144,7 @@ char F1newstatus(GPPort *port, int verbose, char *return_buf) sendcommand(port,buf, 2); recvdata(port, buf, 33); #ifdef DEBUG - fprintf(stderr,"Status: %02x%02x:%02x(len = %d)\n", buf[0], buf[1], buf[2], i); + fprintf(stderr,"Status: %02x%02x:%02x\n", buf[0], buf[1], buf[2]); #endif if((buf[0] != 0x03) || (buf[1] != 0x02) ||(buf[2] != 0)){ Abort(port); @@ -199,7 +199,7 @@ int F1status(GPPort *port) sendcommand(port,buf, 2); recvdata(port, buf, 33); #ifdef DEBUG - fprintf(stderr,"Status: %02x%02x:%02x(len = %d)\n", buf[0], buf[1], buf[2], i); + fprintf(stderr,"Status: %02x%02x:%02x\n", buf[0], buf[1], buf[2]); #endif if((buf[0] != 0x03) || (buf[1] != 0x02) ||(buf[2] != 0)){ Abort(port); @@ -436,13 +436,6 @@ unsigned long F1finfo(GPPort *port,char *name) return(0); } -#ifdef DEBUG - fprintf(stderr,"info:"); - for(i = 0; i < len ; i++) - fprintf(stderr,"%02x ", buf[i]); - fprintf(stderr,"len = %d\n", len); -#endif - flen = buf[33] * 0x1000000 + buf[34] * 0x10000 + buf[35] * 0x100 + buf[36]; #ifdef DEBUG