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
merge-requests/1/head
Stef 2012-07-30 11:14:17 +02:00
rodzic 2065cba6a9
commit dd2b18c1d2
3 zmienionych plików z 4 dodań i 8 usunięć

Wyświetl plik

@ -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);
}

Wyświetl plik

@ -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;

Wyświetl plik

@ -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;
}