From 24f6d3563b6d2c3992359b4a0385eb373acaeb70 Mon Sep 17 00:00:00 2001 From: Oliver Rauch Date: Thu, 1 May 2003 20:19:31 +0000 Subject: [PATCH] Update of umax-scsi backend --- ChangeLog | 12 ++++++++++++ backend/umax-scanner.c | 3 ++- backend/umax.c | 32 ++++++++++++++++++++++++++++++-- backend/umax.conf | 2 ++ backend/umax.h | 4 ++++ doc/sane-umax.man | 9 ++++++++- 6 files changed, 58 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8db313521..17fa0954e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2003-05-01 Oliver Rauch + + * backend/ + umax-scanner.c umax-scsidef.h umax-uc1200se.c umax-uc630.c + umax-ug630.c umax-usb.c umax.conf umax.h + umax-scanner.h umax-uc1200s.c umax-uc1260.c umax-uc840.c + umax-ug80.c umax.c umax.desc + doc/sane-umax.man doc/umax/* + + update of sane-umax backend + + 2003-04-30 Oliver Schwartz * backend/snapscan.c backend/snapscan.h backend/snapscan-options.c diff --git a/backend/umax-scanner.c b/backend/umax-scanner.c index 0b9b05be7..3397d99d2 100644 --- a/backend/umax-scanner.c +++ b/backend/umax-scanner.c @@ -119,7 +119,7 @@ static char *scanner_str[] = "LinoHell", "SAPHIR2 ", "LinoHell", "SAPHIR3 ", /* 1000x2000 dpi */ /* "LinoHell", "SAPHIR4 ", */ - "Linotype", "SAPHIR4 ", + "Linotype", "SAPHIR4 ", /* Linotype-Hell Saphir Ultra II */ /* "LinoHell", "OPAL ", */ "HDM ", "LS4H1S ", /* Linoscan 1400 */ "Nikon ", "AX-110 ", /* is a Vista S6E */ @@ -128,6 +128,7 @@ static char *scanner_str[] = "EPSON ", "Perfection600 ", "ESCORT ", "Galleria 600S ", /* is an Astra 600S */ "EDGE ", "KTX-9600US ", /* may be an Astra 1220S */ + "TriGem ", "PowerScanII ", /* is a Supervista S12 */ "END_OF_LIST" }; diff --git a/backend/umax.c b/backend/umax.c index 295bfc312..de41a655a 100644 --- a/backend/umax.c +++ b/backend/umax.c @@ -3073,6 +3073,28 @@ static void umax_correct_inquiry(Umax_Device *dev, char *vendor, char *product, } } } + else if (!strncmp(vendor, "TriGem ", 7)) + { + if (!strncmp(product, "PowerScanII ", 12)) /* is a Supervista S-12 */ + { + DBG(DBG_warning,"setting up special options for %s\n", product); + + DBG(DBG_warning," - setting maximum calibration data lines to 66\n"); + set_inquiry_max_calibration_data_lines(dev->buffer[0], 66); + + if (dev->calibration_width_offset == -99999) /* no calibration-width-offset defined in umax.conf */ + { + dev->calibration_width_offset = -1; + DBG(DBG_warning," - adding calibration width offset of %d pixels\n", dev->calibration_width_offset); + } + + if (dev->calibration_area == -1) /* no calibration area defined in umax.conf */ + { + DBG(DBG_warning," - calibration by driver is done for each CCD pixel\n"); + dev->calibration_area = UMAX_CALIBRATION_AREA_CCD; + } + } + } } @@ -5916,6 +5938,12 @@ SANE_Status sane_init(SANE_Int *version_code, SANE_Auth_Callback authorize) size_t len; FILE *fp; + /* we have to initialize these global variables here because sane_init can be called several times */ + num_devices = 0; + devlist = NULL; + first_dev = NULL; + first_handle = NULL; + DBG_INIT(); DBG(DBG_sane_init,"sane_init\n"); @@ -7543,8 +7571,8 @@ SANE_Status sane_start(SANE_Handle handle) /* The scanner defines a x-origin-offset for DOR mode, this offset is used for the */ /* x range in this backend, so the frontend/user knows the correct positions related to */ - /* scannerīs surface. But the scanner wants x values from origin 0 instead */ - /* of the x-origin defined by the scannerīs inquiry */ + /* scanner's surface. But the scanner wants x values from origin 0 instead */ + /* of the x-origin defined by the scanner`s inquiry */ if (scanner->device->dor != 0) /* dor mode active */ { DBG(DBG_info,"substracting DOR x-origin-offset from upper left x\n"); diff --git a/backend/umax.conf b/backend/umax.conf index d7ec87c79..15c1414a2 100644 --- a/backend/umax.conf +++ b/backend/umax.conf @@ -93,12 +93,14 @@ scsi LinoHell Office scsi LinoHell Office2 scsi LinoHell SAPHIR2 scsi LinoHell SAPHIR3 +scsi Linotype SAPHIR4 scsi HDM LS4H1S scsi Nikon AX-110 scsi Nikon AX-210 scsi KYE ColorPage-HR5 scsi EPSON Perfection600 scsi ESCORT "Galleria 600S" +scsi TriGem PowerScanII # Umax Astra 2200 via USB: # usb vendor product diff --git a/backend/umax.h b/backend/umax.h index a4d023e86..eb9ece99c 100644 --- a/backend/umax.h +++ b/backend/umax.h @@ -65,6 +65,10 @@ /* --------------------------------------------------------------------------------------------------------- */ +#define SANE_UMAX_FIX_ROUND(val) ((SANE_Word) ((val) * (1 << SANE_FIXED_SCALE_SHIFT) + 1.0 / (1 << (SANE_FIXED_SCALE_SHIFT+1)))) + +/* --------------------------------------------------------------------------------------------------------- */ + enum Umax_Option { OPT_NUM_OPTS = 0, diff --git a/doc/sane-umax.man b/doc/sane-umax.man index 87f078917..5ad382afc 100644 --- a/doc/sane-umax.man +++ b/doc/sane-umax.man @@ -1,4 +1,4 @@ -.TH sane-umax 5 "16 august 2000" "@PACKAGEVERSION@" "SANE Scanner Access Now Easy" +.TH sane-umax 5 "29 november 2002" "@PACKAGEVERSION@" "SANE Scanner Access Now Easy" .IX sane-umax .SH NAME @@ -42,6 +42,7 @@ shown below: option calibration-full-ccd -1 option calibration-width-offset -1 option calibration-bytes-pixel -1 + option exposure-time-rgb-bind -1 option invert-shading-data -1 option lamp-control-available 0 option gamma-lsb-padded 0 @@ -122,6 +123,12 @@ shown below: 1 = 1 byte/pixel, 2 = 2 bytes/pixel use # bytes per pixel for calibration + + - exposure-time-rgb-bind: + values: + -1 = automatically set by driver - if known + 0 = disabled (own selection for red, green and blue) + 1 = enabled (same values for red, green and blue) - invert-shading-data: values: