kopia lustrzana https://gitlab.com/sane-project/backends
Final bugfixes for bascic support of Epson 1670
rodzic
4ffa0cb14b
commit
fc3960ce3e
|
@ -1,3 +1,8 @@
|
|||
2003-11-08 Oliver Schwartz <Oliver.Schwartz@gmx.de>
|
||||
|
||||
* backend/snapscan-scsi.c backend/snapscan.c doc/descriptions/snapscan.desc:
|
||||
Final bugfixes for Epson 1670
|
||||
|
||||
2003-11-07 Henning Meier-Geinitz <henning@meier-geinitz.de>
|
||||
|
||||
* README.openbsd: Added info about setting permissions (Bug #300311).
|
||||
|
|
|
@ -760,18 +760,17 @@ static SANE_Status set_window (SnapScan_Scanner *pss)
|
|||
DBG (DL_CALL_TRACE, "%s Resolution: %d\n", me, pss->res);
|
||||
|
||||
pos_factor = pss->actual_res;
|
||||
if (pss->pdev->model == PRISA5000)
|
||||
switch (pss->pdev->model)
|
||||
{
|
||||
if (pss->res > 600)
|
||||
{
|
||||
pos_factor = 1200;
|
||||
}
|
||||
else
|
||||
{
|
||||
pos_factor = 600;
|
||||
}
|
||||
case PRISA5000:
|
||||
pos_factor = (pss->res > 600) ? 1200 : 600;
|
||||
break;
|
||||
case PERFECTION1670:
|
||||
pos_factor = (pss->res > 800) ? 1600 : 800;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* it's an ugly sound if the scanner drives against the rear
|
||||
wall, and with changing max values we better be sure */
|
||||
check_range(&(pss->brx), pss->pdev->x_range);
|
||||
|
@ -1013,9 +1012,9 @@ static SANE_Status wait_scanner_ready (SnapScan_Scanner *pss)
|
|||
/* first additional sense byte contains time to wait */
|
||||
{
|
||||
int delay = pss->asi1 + 1;
|
||||
DBG (DL_INFO,
|
||||
"%s: scanner warming up. Waiting %ld seconds.\n",
|
||||
me, (long) delay);
|
||||
DBG (0,
|
||||
"Scanner warming up - waiting %ld seconds.\n",
|
||||
(long) delay);
|
||||
sleep (delay);
|
||||
}
|
||||
break;
|
||||
|
@ -1223,6 +1222,9 @@ static SANE_Status download_firmware(SnapScan_Scanner * pss)
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.26 2003/11/07 23:26:49 oliver-guest
|
||||
* Final bugfixes for bascic support of Epson 1670
|
||||
*
|
||||
* Revision 1.25 2003/10/21 20:43:25 oliver-guest
|
||||
* Bugfixes for SnapScan backend
|
||||
*
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
|
||||
#define EXPECTED_MAJOR 1
|
||||
#define MINOR_VERSION 4
|
||||
#define BUILD 31
|
||||
#define BUILD 34
|
||||
|
||||
#define BACKEND_NAME snapscan
|
||||
|
||||
|
@ -204,9 +204,13 @@ static const SANE_Device **get_devices_list = NULL;
|
|||
/* Initialize gamma tables */
|
||||
static SANE_Status init_gamma(SnapScan_Scanner * ps)
|
||||
{
|
||||
static const char me[] = "init_gamma";
|
||||
u_char *gamma;
|
||||
|
||||
ps->gamma_length = 1 << ps->bpp;
|
||||
DBG (DL_MINOR_INFO, "%s: using 4*%d bytes for gamma table\n",
|
||||
me,
|
||||
ps->gamma_length);
|
||||
|
||||
ps->gamma_tables =
|
||||
(SANE_Int *) malloc(4 * ps->gamma_length * sizeof(SANE_Int));
|
||||
|
@ -921,13 +925,9 @@ SANE_Status sane_open (SANE_String_Const name, SANE_Handle * h)
|
|||
status = download_firmware(pss);
|
||||
CHECK_STATUS (status, me, "download_firmware");
|
||||
/* send inquiry command again, wait for scanner to initialize */
|
||||
do
|
||||
{
|
||||
DBG (DL_INFO, "%s: Waiting for scanner after firmware upload\n",me);
|
||||
sleep(1);
|
||||
status = inquiry (pss);
|
||||
} while (status == SANE_STATUS_DEVICE_BUSY);
|
||||
|
||||
status = wait_scanner_ready(pss);
|
||||
CHECK_STATUS (status, me, "wait_scanner_ready after firmware upload");
|
||||
status = inquiry (pss);
|
||||
CHECK_STATUS (status, me, "inquiry after firmware upload");
|
||||
/* The model identifier may change after firmware upload */
|
||||
memcpy (model, &pss->buf[INQUIRY_PRODUCT], 16);
|
||||
|
@ -1488,13 +1488,12 @@ SANE_Status sane_start (SANE_Handle h)
|
|||
status = wait_scanner_ready (pss);
|
||||
CHECK_STATUS (status, me, "wait_scanner_ready");
|
||||
|
||||
/* download the gamma and halftone tables */
|
||||
/* start scanning; reserve the unit first, because a release_unit is
|
||||
necessary to abort a scan in progress */
|
||||
|
||||
status = download_gamma_tables(pss);
|
||||
CHECK_STATUS (status, me, "download_gamma_tables");
|
||||
pss->state = ST_SCAN_INIT;
|
||||
|
||||
status = download_halftone_matrices(pss);
|
||||
CHECK_STATUS (status, me, "download_halftone_matrices");
|
||||
reserve_unit(pss);
|
||||
|
||||
/* set up the window and fetch the resulting scanner parameters */
|
||||
status = set_window(pss);
|
||||
|
@ -1503,6 +1502,14 @@ SANE_Status sane_start (SANE_Handle h)
|
|||
status = inquiry(pss);
|
||||
CHECK_STATUS (status, me, "inquiry");
|
||||
|
||||
/* download the gamma and halftone tables */
|
||||
|
||||
status = download_gamma_tables(pss);
|
||||
CHECK_STATUS (status, me, "download_gamma_tables");
|
||||
|
||||
status = download_halftone_matrices(pss);
|
||||
CHECK_STATUS (status, me, "download_halftone_matrices");
|
||||
|
||||
/* we must measure the data transfer rate between the host and the
|
||||
scanner, and the method varies depending on whether there is a
|
||||
ring buffer or not. */
|
||||
|
@ -1522,12 +1529,6 @@ SANE_Status sane_start (SANE_Handle h)
|
|||
pss->ms_per_line,
|
||||
pss->bytes_per_line/pss->ms_per_line);
|
||||
|
||||
/* start scanning; reserve the unit first, because a release_unit is
|
||||
necessary to abort a scan in progress */
|
||||
|
||||
pss->state = ST_SCAN_INIT;
|
||||
|
||||
reserve_unit(pss);
|
||||
|
||||
if(pss->val[OPT_QUALITY_CAL].b)
|
||||
{
|
||||
|
@ -1547,13 +1548,18 @@ SANE_Status sane_start (SANE_Handle h)
|
|||
release_unit (pss);
|
||||
return status;
|
||||
}
|
||||
/* Wait for scanner ready again (e.g. until paper is loaded from an ADF) */
|
||||
status = wait_scanner_ready (pss);
|
||||
if (status != SANE_STATUS_GOOD)
|
||||
|
||||
if (pss->source == SRC_ADF)
|
||||
{
|
||||
DBG (DL_MAJOR_ERROR, "%s: scan command failed while waiting for scanner: %s.\n", me, sane_strstatus(status));
|
||||
release_unit (pss);
|
||||
return status;
|
||||
/* Wait for scanner ready again (e.g. until paper is loaded from an ADF) */
|
||||
/* Maybe replace with get_data_buffer_status()? */
|
||||
status = wait_scanner_ready (pss);
|
||||
if (status != SANE_STATUS_GOOD)
|
||||
{
|
||||
DBG (DL_MAJOR_ERROR, "%s: scan command failed while waiting for scanner: %s.\n", me, sane_strstatus(status));
|
||||
release_unit (pss);
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
||||
DBG (DL_MINOR_INFO, "%s: starting the reader process.\n", me);
|
||||
|
@ -1742,6 +1748,9 @@ SANE_Status sane_get_select_fd (SANE_Handle h, SANE_Int * fd)
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.35 2003/11/07 23:26:49 oliver-guest
|
||||
* Final bugfixes for bascic support of Epson 1670
|
||||
*
|
||||
* Revision 1.34 2003/10/21 20:43:25 oliver-guest
|
||||
* Bugfixes for SnapScan backend
|
||||
*
|
||||
|
|
|
@ -220,5 +220,9 @@
|
|||
:interface "USB"
|
||||
:status :good
|
||||
|
||||
:model "Perfection 1670"
|
||||
:interface "USB"
|
||||
:status :basic
|
||||
|
||||
; :comment and :url specifiers are optional after :mfg, :model, :desc,
|
||||
; and at the top-level.
|
||||
|
|
Ładowanie…
Reference in New Issue