diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-10-08 12:32:49 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-10-08 12:32:49 +0200 |
commit | cfd27ef2ad8b005fd47ab41ef29b71d9e3d48201 (patch) | |
tree | 56cb8849a5df91b19b72fd4f48c79c343cd9bc5e /backend/pixma_common.c | |
parent | ba8d09abe681600aad991f4a75e904615b7ed29f (diff) |
Imported Upstream version 1.0.25upstream/1.0.25
Diffstat (limited to 'backend/pixma_common.c')
-rw-r--r-- | backend/pixma_common.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/backend/pixma_common.c b/backend/pixma_common.c index b417d07..9d41f7a 100644 --- a/backend/pixma_common.c +++ b/backend/pixma_common.c @@ -1,8 +1,8 @@ /* SANE - Scanner Access Now Easy. + Copyright (C) 2011-2015 Rolf Bensch <rolf at bensch hyphen online dot de> Copyright (C) 2007-2008 Nicolas Martin, <nicols-guest at alioth dot debian dot org> Copyright (C) 2006-2007 Wittawat Yamwong <wittawat@web.de> - Copyright (C) 2011-2013 Rolf Bensch <rolf at bensch hyphen online dot de> This file is part of the SANE package. @@ -318,7 +318,7 @@ pixma_get_time (time_t * sec, uint32_t * usec) uint8_t * pixma_r_to_ir (uint8_t * gptr, uint8_t * sptr, unsigned w, unsigned c) { - unsigned i, j, g; + unsigned i; /* PDBG (pixma_dbg (4, "*pixma_rgb_to_ir*****\n")); */ @@ -383,7 +383,7 @@ pixma_binarize_line(pixma_scan_param_t * sp, uint8_t * dst, uint8_t * src, unsig unsigned char mask; uint8_t min, max; - /* PDBG (pixma_dbg (4, "*pixma_binarize_line***** src = %u, dst = %u, width = %u, c = %u, threshold = %u, thershold_curve = %u *****\n", + /* PDBG (pixma_dbg (4, "*pixma_binarize_line***** src = %u, dst = %u, width = %u, c = %u, threshold = %u, threshold_curve = %u *****\n", src, dst, width, c, sp->threshold, sp->threshold_curve)); */ /* 16 bit grayscale not supported */ @@ -655,7 +655,10 @@ pixma_cmd_transaction (pixma_t * s, const void *cmd, unsigned cmdlen, { error = pixma_read (s->io, data, expected_len); if (error == PIXMA_ETIMEDOUT) + { PDBG (pixma_dbg (2, "No response yet. Timed out in %d sec.\n", tmo)); + pixma_sleep (1000000); /* 1s timeout */ + } } while (error == PIXMA_ETIMEDOUT && --tmo != 0); if (error < 0) @@ -1048,9 +1051,11 @@ pixma_check_scan_param (pixma_t * s, pixma_scan_param_t * sp) if (s->ops->check_param (s, sp) < 0) return PIXMA_EINVAL; - /* FIXME: I assume the same minimum width and height for every model. */ - CLAMP2 (sp->x, sp->w, 13, s->cfg->width, sp->xdpi); - CLAMP2 (sp->y, sp->h, 8, s->cfg->height, sp->ydpi); + /* FIXME: I assume the same minimum width and height for every model. + * new scanners need minimum 16 px height + * minimum image size: 16 px x 16 px */ + CLAMP2 (sp->x, sp->w, 16, s->cfg->width, sp->xdpi); + CLAMP2 (sp->y, sp->h, 16, s->cfg->height, sp->ydpi); switch (sp->source) { |