From dd2b18c1d2fd0ae01809ce83a5fe932841951c87 Mon Sep 17 00:00:00 2001 From: Stef Date: Mon, 30 Jul 2012 11:14:17 +0200 Subject: [PATCH] fix '5x5 2 fois' test case - there is no sane_cancel call betewwen each scans in batch scanning so call end_scan when all data has been read from the scanner --- backend/genesys.c | 7 ++----- backend/genesys_gl646.c | 2 +- backend/genesys_gl843.c | 3 +-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/backend/genesys.c b/backend/genesys.c index b08c98a50..37b4f402c 100644 --- a/backend/genesys.c +++ b/backend/genesys.c @@ -4076,7 +4076,7 @@ genesys_start_scan (Genesys_Device * dev, SANE_Bool lamp_off) } /* wait for lamp warmup : until a warmup for TRANSPARENCY is designed, skip - * it when scanning from XPA */ + * it when scanning from XPA. */ if (!(dev->model->flags & GENESYS_FLAG_SKIP_WARMUP) && (dev->settings.scan_method == SCAN_METHOD_FLATBED)) { @@ -5227,10 +5227,7 @@ Problems with the first approach: RIE (sanei_genesys_buffer_consume (src_buffer, bytes)); /* end scan if all needed data have been read */ - /* TODO extend this to other ASICs */ - if(((dev->model->asic_type == GENESYS_GL847) - ||(dev->model->asic_type == GENESYS_GL124)) - &&(dev->total_bytes_read >= dev->total_bytes_to_read)) + if(dev->total_bytes_read >= dev->total_bytes_to_read) { dev->model->cmd_set->end_scan (dev, dev->reg, SANE_TRUE); } diff --git a/backend/genesys_gl646.c b/backend/genesys_gl646.c index 8e91c0fee..4a71b2e34 100644 --- a/backend/genesys_gl646.c +++ b/backend/genesys_gl646.c @@ -4500,7 +4500,7 @@ gl646_init_regs_for_warmup (Genesys_Device * dev, resolution = get_closest_resolution (dev->model->ccd_type, 300, SANE_FALSE); - /* set up for a half width 2 lines color scan without moving */ + /* set up for a half width 2 lines gray scan without moving */ settings.scan_method = SCAN_METHOD_FLATBED; settings.scan_mode = SCAN_MODE_GRAY; settings.xres = resolution; diff --git a/backend/genesys_gl843.c b/backend/genesys_gl843.c index 75770b763..d6a1471c4 100644 --- a/backend/genesys_gl843.c +++ b/backend/genesys_gl843.c @@ -1976,8 +1976,7 @@ gl843_stop_action (Genesys_Device * dev) status = sanei_genesys_write_register (dev, REG01, val); if (status != SANE_STATUS_GOOD) { - DBG (DBG_error, - "end_scan: failed to write register 01: %s\n", + DBG (DBG_error, "%s: failed to write register 01: %s\n", __FUNCTION__, sane_strstatus (status)); return status; }