Debug options are only enabled if the debug level is 1 and higher. Added product

id 0x0402 for Plustek U16B.
merge-requests/1/head
Henning Geinitz 2004-01-19 17:35:57 +00:00
rodzic ef0e9d92b2
commit 6026b31f36
7 zmienionych plików z 49 dodań i 11 usunięć

Wyświetl plik

@ -1,3 +1,10 @@
2004-01-19 Henning Meier-Geinitz <henning@meier-geinitz.de>
* backend/gt68xx.c backend/gt68xx.conf backend/gt68xx_devices.c
doc/sane-gt68xx.man doc/descriptions/gt68xx.desc
doc/gt68xx/gt68xx.CHANGES: Debug options are only enabled if the
debug level is 1 and higher. Added product id 0x0402 for Plustek U16B.
2004-01-17 Henning Meier-Geinitz <henning@meier-geinitz.de> 2004-01-17 Henning Meier-Geinitz <henning@meier-geinitz.de>
* doc/gamma4scanimage.man: scanimage is in section 1. * doc/gamma4scanimage.man: scanimage is in section 1.

Wyświetl plik

@ -1,7 +1,7 @@
/* sane - Scanner Access Now Easy. /* sane - Scanner Access Now Easy.
Copyright (C) 2002 Sergey Vlasov <vsu@altlinux.ru> Copyright (C) 2002 Sergey Vlasov <vsu@altlinux.ru>
Copyright (C) 2002, 2003 Henning Meier-Geinitz <henning@meier-geinitz.de> Copyright (C) 2002 - 2004 Henning Meier-Geinitz <henning@meier-geinitz.de>
This file is part of the SANE package. This file is part of the SANE package.
@ -48,7 +48,7 @@
#include "../include/sane/config.h" #include "../include/sane/config.h"
#define BUILD 52 #define BUILD 53
#define MAX_DEBUG #define MAX_DEBUG
#define WARMUP_TIME 30 #define WARMUP_TIME 30
#define CALIBRATION_HEIGHT 2.5 #define CALIBRATION_HEIGHT 2.5
@ -111,6 +111,7 @@ static SANE_Int new_dev_len = 0;
static SANE_Int new_dev_alloced = 0; static SANE_Int new_dev_alloced = 0;
/* Is this computer little-endian ?*/ /* Is this computer little-endian ?*/
SANE_Bool little_endian; SANE_Bool little_endian;
SANE_Bool debug_options = SANE_FALSE;
static SANE_String_Const mode_list[] = { static SANE_String_Const mode_list[] = {
SANE_I18N ("Color"), SANE_I18N ("Color"),
@ -519,6 +520,8 @@ init_options (GT68xx_Scanner * s)
s->opt[OPT_DEBUG_GROUP].size = 0; s->opt[OPT_DEBUG_GROUP].size = 0;
s->opt[OPT_DEBUG_GROUP].cap = 0; s->opt[OPT_DEBUG_GROUP].cap = 0;
s->opt[OPT_DEBUG_GROUP].constraint_type = SANE_CONSTRAINT_NONE; s->opt[OPT_DEBUG_GROUP].constraint_type = SANE_CONSTRAINT_NONE;
if (!debug_options)
DISABLE (OPT_DEBUG_GROUP);
/* auto warmup */ /* auto warmup */
s->opt[OPT_AUTO_WARMUP].name = "auto-warmup"; s->opt[OPT_AUTO_WARMUP].name = "auto-warmup";
@ -530,7 +533,7 @@ init_options (GT68xx_Scanner * s)
s->opt[OPT_AUTO_WARMUP].unit = SANE_UNIT_NONE; s->opt[OPT_AUTO_WARMUP].unit = SANE_UNIT_NONE;
s->opt[OPT_AUTO_WARMUP].constraint_type = SANE_CONSTRAINT_NONE; s->opt[OPT_AUTO_WARMUP].constraint_type = SANE_CONSTRAINT_NONE;
s->val[OPT_AUTO_WARMUP].w = SANE_TRUE; s->val[OPT_AUTO_WARMUP].w = SANE_TRUE;
if (s->dev->model->is_cis) if (s->dev->model->is_cis || !debug_options)
DISABLE (OPT_AUTO_WARMUP); DISABLE (OPT_AUTO_WARMUP);
/* full scan */ /* full scan */
@ -543,6 +546,8 @@ init_options (GT68xx_Scanner * s)
s->opt[OPT_FULL_SCAN].unit = SANE_UNIT_NONE; s->opt[OPT_FULL_SCAN].unit = SANE_UNIT_NONE;
s->opt[OPT_FULL_SCAN].constraint_type = SANE_CONSTRAINT_NONE; s->opt[OPT_FULL_SCAN].constraint_type = SANE_CONSTRAINT_NONE;
s->val[OPT_FULL_SCAN].w = SANE_FALSE; s->val[OPT_FULL_SCAN].w = SANE_FALSE;
if (!debug_options)
DISABLE (OPT_FULL_SCAN);
/* coarse calibration */ /* coarse calibration */
s->opt[OPT_COARSE_CAL].name = "coarse-calibration"; s->opt[OPT_COARSE_CAL].name = "coarse-calibration";
@ -556,6 +561,8 @@ init_options (GT68xx_Scanner * s)
s->opt[OPT_COARSE_CAL].unit = SANE_UNIT_NONE; s->opt[OPT_COARSE_CAL].unit = SANE_UNIT_NONE;
s->opt[OPT_COARSE_CAL].constraint_type = SANE_CONSTRAINT_NONE; s->opt[OPT_COARSE_CAL].constraint_type = SANE_CONSTRAINT_NONE;
s->val[OPT_COARSE_CAL].w = SANE_TRUE; s->val[OPT_COARSE_CAL].w = SANE_TRUE;
if (!debug_options)
DISABLE (OPT_COARSE_CAL);
/* coarse calibration only once */ /* coarse calibration only once */
s->opt[OPT_COARSE_CAL_ONCE].name = "coarse-calibration-once"; s->opt[OPT_COARSE_CAL_ONCE].name = "coarse-calibration-once";
@ -570,6 +577,8 @@ init_options (GT68xx_Scanner * s)
s->opt[OPT_COARSE_CAL_ONCE].unit = SANE_UNIT_NONE; s->opt[OPT_COARSE_CAL_ONCE].unit = SANE_UNIT_NONE;
s->opt[OPT_COARSE_CAL_ONCE].constraint_type = SANE_CONSTRAINT_NONE; s->opt[OPT_COARSE_CAL_ONCE].constraint_type = SANE_CONSTRAINT_NONE;
s->val[OPT_COARSE_CAL_ONCE].w = SANE_FALSE; s->val[OPT_COARSE_CAL_ONCE].w = SANE_FALSE;
if (!debug_options)
DISABLE (OPT_COARSE_CAL_ONCE);
/* calibration */ /* calibration */
s->opt[OPT_QUALITY_CAL].name = SANE_NAME_QUALITY_CAL; s->opt[OPT_QUALITY_CAL].name = SANE_NAME_QUALITY_CAL;
@ -579,6 +588,8 @@ init_options (GT68xx_Scanner * s)
s->opt[OPT_QUALITY_CAL].unit = SANE_UNIT_NONE; s->opt[OPT_QUALITY_CAL].unit = SANE_UNIT_NONE;
s->opt[OPT_QUALITY_CAL].constraint_type = SANE_CONSTRAINT_NONE; s->opt[OPT_QUALITY_CAL].constraint_type = SANE_CONSTRAINT_NONE;
s->val[OPT_QUALITY_CAL].w = SANE_TRUE; s->val[OPT_QUALITY_CAL].w = SANE_TRUE;
if (!debug_options)
DISABLE (OPT_QUALITY_CAL);
/* fast preview */ /* fast preview */
s->opt[OPT_FAST_PREVIEW].name = "fast-preview"; s->opt[OPT_FAST_PREVIEW].name = "fast-preview";
@ -589,6 +600,8 @@ init_options (GT68xx_Scanner * s)
"resolution mode."); "resolution mode.");
s->opt[OPT_FAST_PREVIEW].type = SANE_TYPE_BOOL; s->opt[OPT_FAST_PREVIEW].type = SANE_TYPE_BOOL;
s->val[OPT_FAST_PREVIEW].w = SANE_TRUE; s->val[OPT_FAST_PREVIEW].w = SANE_TRUE;
if (!debug_options)
DISABLE (OPT_FAST_PREVIEW);
/* "Enhancement" group: */ /* "Enhancement" group: */
s->opt[OPT_ENHANCEMENT_GROUP].title = SANE_I18N ("Enhancement"); s->opt[OPT_ENHANCEMENT_GROUP].title = SANE_I18N ("Enhancement");
@ -940,6 +953,14 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
new_dev_len = 0; new_dev_len = 0;
new_dev_alloced = 0; new_dev_alloced = 0;
#ifdef DBG_LEVEL
if (DBG_LEVEL > 0)
{
DBG (5, "sane_init: debug options are enabled, handle with care\n");
debug_options = SANE_TRUE;
}
#endif
fp = sanei_config_open (GT68XX_CONFIG_FILE); fp = sanei_config_open (GT68XX_CONFIG_FILE);
if (!fp) if (!fp)
{ {

Wyświetl plik

@ -129,6 +129,7 @@ usb 0x07b3 0x0400
############################################################################## ##############################################################################
# Autodetect Plustek OpticPro U16B and UT16B # Autodetect Plustek OpticPro U16B and UT16B
usb 0x07b3 0x0402
usb 0x07b3 0x0403 usb 0x07b3 0x0403
# Plustek OpticPro U16B doesn't need any manual settings # Plustek OpticPro U16B doesn't need any manual settings

Wyświetl plik

@ -1203,7 +1203,8 @@ static GT68xx_USB_Device_Entry gt68xx_usb_device_list[] = {
{0x043d, 0x002d, &lexmark_x73_model}, {0x043d, 0x002d, &lexmark_x73_model},
{0x07b3, 0x0400, &plustek_op1248u_model}, {0x07b3, 0x0400, &plustek_op1248u_model},
{0x07b3, 0x0401, &plustek_op1248u_model}, /* Same scanner, different id? */ {0x07b3, 0x0401, &plustek_op1248u_model}, /* Same scanner, different id? */
{0x07b3, 0x0403, &plustek_u16b_model}, {0x07b3, 0x0402, &plustek_u16b_model},
{0x07b3, 0x0403, &plustek_u16b_model}, /* two ids? 403 seems to be more common */
{0x07b3, 0x0413, &plustek_opticslim1200}, {0x07b3, 0x0413, &plustek_opticslim1200},
{0x0458, 0x2011, &genius_vivid3x_model}, {0x0458, 0x2011, &genius_vivid3x_model},
{0x0458, 0x2017, &genius_vivid3xe_model}, {0x0458, 0x2017, &genius_vivid3xe_model},

Wyświetl plik

@ -1,5 +1,5 @@
:backend "gt68xx" :backend "gt68xx"
:version "1.0-52" :version "1.0-53"
:manpage "sane-gt68xx" :manpage "sane-gt68xx"
:url "http://www.meier-geinitz.de/sane/gt68xx-backend/" :url "http://www.meier-geinitz.de/sane/gt68xx-backend/"
:comment "Only the USB scanners mentioned below are supported. For other Mustek BearPaws, look at the Plustek and the MA-1509 backend." :comment "Only the USB scanners mentioned below are supported. For other Mustek BearPaws, look at the Plustek and the MA-1509 backend."
@ -195,7 +195,7 @@
:model "ScanExpress A3 USB" :model "ScanExpress A3 USB"
:interface "USB" :interface "USB"
:status :good :status :good
:comment "Should work but colors may not be perfect yet. I've only few reports so please contact me, if you own such a device and tell me, if you find any problems" :comment "Should work but colors may not be perfect yet."
:model "ScanExpress 2400 USB" :model "ScanExpress 2400 USB"
:interface "USB" :interface "USB"

Wyświetl plik

@ -1,5 +1,11 @@
gt68xx.CHANGES -*-text-*- gt68xx.CHANGES -*-text-*-
V 1.0-53 (2004-01-19)
* Debug options are only enabled if the debug level is 1 and higher. This may
stop some people from activating dangerous options.
* Added product id 0x0402 for Plustek U16B.
V 1.0-52 (2004-01-01) V 1.0-52 (2004-01-01)
* gt68xx_gt6801.c: Fixed a bug in the stop scan function for Plustek U16b. * gt68xx_gt6801.c: Fixed a bug in the stop scan function for Plustek U16b.

Wyświetl plik

@ -1,4 +1,4 @@
.TH sane-gt68xx 5 "13 Jan 2004" "@PACKAGEVERSION@" "SANE Scanner Access Now Easy" .TH sane-gt68xx 5 "19 Jan 2004" "@PACKAGEVERSION@" "SANE Scanner Access Now Easy"
.IX sane-gt68xx .IX sane-gt68xx
.SH NAME .SH NAME
sane-gt68xx \- SANE backend for GT-68XX based USB flatbed scanners sane-gt68xx \- SANE backend for GT-68XX based USB flatbed scanners
@ -198,7 +198,7 @@ automatic coarse calibration is disabled, or to make automatic coarse
calibration faster. For the latter usage, enable debug level 3 (see below), calibration faster. For the latter usage, enable debug level 3 (see below),
scan an image and look for debug line string with "afe". Copy this line to scan an image and look for debug line string with "afe". Copy this line to
.IR gt68xx.conf . .IR gt68xx.conf .
The option has six parameters: res offset, red gain, green offset, green gain, The option has six parameters: red offset, red gain, green offset, green gain,
blue offset, and blue gain. blue offset, and blue gain.
.PP .PP
A sample configuration file is shown below: A sample configuration file is shown below:
@ -247,9 +247,11 @@ to "/tmp/config:" would result in directories "tmp/config", ".", and
"@CONFIGDIR@" being searched (in this order). "@CONFIGDIR@" being searched (in this order).
.TP .TP
.B SANE_DEBUG_GT68XX .B SANE_DEBUG_GT68XX
If the library was compiled with debug support enabled, this If the library was compiled with debug support enabled, this environment
environment variable controls the debug level for this backend. Higher variable controls the debug level for this backend. Higher debug levels
debug levels increase the verbosity of the output. increase the verbosity of the output. If the debug level is set to 1 or higher,
some debug options become available that are normally hidden. Handle them with
care.
Example: Example:
export SANE_DEBUG_GT68XX=4 export SANE_DEBUG_GT68XX=4