backend/epson_usb.c: add USB device ID for CX6400 back in

backend/epson.c: disable "feed" command for Perfection 1640 w/ ADF
merge-requests/1/head
Karl Heinz Kremer 2004-09-14 23:21:29 +00:00
rodzic 1886187673
commit f19a7ac039
3 zmienionych plików z 77 dodań i 81 usunięć

Wyświetl plik

@ -1,3 +1,8 @@
2004-09-14 Karl Heinz Kremer <khk@khk.net>
* backend/epson_usb.c: add USB device ID for CX6400 back in
* backend/epson.c: disable "feed" command for Perfection 1640 w/ ADF
2004-09-08 Gerhard Jaeger <gerhard@gjaeger.de> 2004-09-08 Gerhard Jaeger <gerhard@gjaeger.de>
* doc/plustek/Plustek-USB.changes: Update. * doc/plustek/Plustek-USB.changes: Update.

Wyświetl plik

@ -16,8 +16,8 @@
Copyright (C) 1999-2004 Karl Heinz Kremer <khk@khk.net> Copyright (C) 1999-2004 Karl Heinz Kremer <khk@khk.net>
*/ */
#define SANE_EPSON_VERSION "SANE Epson Backend v0.2.41 - 2004-02-01" #define SANE_EPSON_VERSION "SANE Epson Backend v0.2.42 - 2004-05-08"
#define SANE_EPSON_BUILD 241 #define SANE_EPSON_BUILD 242
/* /*
This file is part of the SANE package. This file is part of the SANE package.
@ -59,6 +59,7 @@
If you do not wish that, delete this exception notice. */ If you do not wish that, delete this exception notice. */
/* /*
2004-05-08 Disable feed() for Perfection1640
2004-02-08 Reformat all source code with "indent -bli0" 2004-02-08 Reformat all source code with "indent -bli0"
2004-02-01 Added D7 function level as copy of D1 for CX-6400 2004-02-01 Added D7 function level as copy of D1 for CX-6400
Added IDs for CX-6400 and Perfection 4870 Added IDs for CX-6400 and Perfection 4870
@ -399,78 +400,57 @@
static EpsonCmdRec epson_cmd[] = { static EpsonCmdRec epson_cmd[] = {
/* /*
* request identity * request identity
* | request identity2 * | request identity2
* | | request status * | | request status
* | | | request condition * | | | request condition
* | | | | set color mode * | | | | set color mode
* | | | | | start scanning * | | | | | start scanning
* | | | | | | set data format * | | | | | | set data format
* | | | | | | | set resolution * | | | | | | | set resolution
* | | | | | | | | set zoom * | | | | | | | | set zoom
* | | | | | | | | | set scan area * | | | | | | | | | set scan area
* | | | | | | | | | | set brightness * | | | | | | | | | | set brightness
* | | | | | | | | | | | set gamma * | | | | | | | | | | | set gamma
* | | | | | | | | | | | | set halftoning * | | | | | | | | | | | | set halftoning
* | | | | | | | | | | | | | set color correction * | | | | | | | | | | | | | set color correction
* | | | | | | | | | | | | | | initialize scanner * | | | | | | | | | | | | | | initialize scanner
* | | | | | | | | | | | | | | | set speed * | | | | | | | | | | | | | | | set speed
* | | | | | | | | | | | | | | | | set lcount * | | | | | | | | | | | | | | | | set lcount
* | | | | | | | | | | | | | | | | | mirror image * | | | | | | | | | | | | | | | | | mirror image
* | | | | | | | | | | | | | | | | | | set gamma table * | | | | | | | | | | | | | | | | | | set gamma table
* | | | | | | | | | | | | | | | | | | | set outline emphasis * | | | | | | | | | | | | | | | | | | | set outline emphasis
* | | | | | | | | | | | | | | | | | | | | set dither * | | | | | | | | | | | | | | | | | | | | set dither
* | | | | | | | | | | | | | | | | | | | | | set color correction coefficients * | | | | | | | | | | | | | | | | | | | | | set color correction coefficients
* | | | | | | | | | | | | | | | | | | | | | | request extension status * | | | | | | | | | | | | | | | | | | | | | | request extension status
* | | | | | | | | | | | | | | | | | | | | | | | control an extension * | | | | | | | | | | | | | | | | | | | | | | | control an extension
* | | | | | | | | | | | | | | | | | | | | | | | | forward feed / eject * | | | | | | | | | | | | | | | | | | | | | | | | forward feed / eject
* | | | | | | | | | | | | | | | | | | | | | | | | | feed * | | | | | | | | | | | | | | | | | | | | | | | | | feed
* | | | | | | | | | | | | | | | | | | | | | | | | | | request push button status * | | | | | | | | | | | | | | | | | | | | | | | | | | request push button status
* | | | | | | | | | | | | | | | | | | | | | | | | | | | control auto area segmentation * | | | | | | | | | | | | | | | | | | | | | | | | | | | control auto area segmentation
* | | | | | | | | | | | | | | | | | | | | | | | | | | | | set film type * | | | | | | | | | | | | | | | | | | | | | | | | | | | | set film type
* | | | | | | | | | | | | | | | | | | | | | | | | | | | | | set exposure time * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | set exposure time
* | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | set bay * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | set bay
* | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | set threshold * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | set threshold
* | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | set focus position * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | set focus position
* | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | request focus position * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | request focus position
* | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
*/ */
{"A1", 'I', 0, 'F', 'S', 0, 'G', 0, 'R', 0, 'A', 0, {0, 0, 0}, 0, 0, 0, 0, {"A1", 'I', 0, 'F','S', 0, 'G', 0, 'R', 0, 'A', 0, {0,0,0}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {"A2", 'I', 0, 'F','S', 0, 'G','D','R','H','A','L',{-3,3,0}, 'Z','B', 0, '@', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{"A2", 'I', 0, 'F', 'S', 0, 'G', 'D', 'R', 'H', 'A', 'L', {-3, 3, 0}, 'Z', {"B1", 'I', 0, 'F','S','C','G','D','R', 0, 'A', 0, {0,0,0}, 0, 'B', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
'B', 0, '@', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {"B2", 'I', 0, 'F','S','C','G','D','R','H','A','L',{-3,3,0}, 'Z','B', 0, '@', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{"B1", 'I', 0, 'F', 'S', 'C', 'G', 'D', 'R', 0, 'A', 0, {0, 0, 0}, 0, 'B', {"B3", 'I', 0, 'F','S','C','G','D','R','H','A','L',{-3,3,0}, 'Z','B','M','@', 0, 0, 0, 0, 0, 0, 'm','f','e', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {"B4", 'I', 0, 'F','S','C','G','D','R','H','A','L',{-3,3,0}, 'Z','B','M','@','g','d', 0, 'z','Q','b','m','f','e', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{"B2", 'I', 0, 'F', 'S', 'C', 'G', 'D', 'R', 'H', 'A', 'L', {-3, 3, 0}, 'Z', {"B5", 'I', 0, 'F','S','C','G','D','R','H','A','L',{-3,3,0}, 'Z','B','M','@','g','d','K','z','Q','b','m','f','e', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
'B', 0, '@', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {"B6", 'I', 0, 'F','S','C','G','D','R','H','A','L',{-3,3,0}, 'Z','B','M','@','g','d','K','z','Q','b','m','f','e', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{"B3", 'I', 0, 'F', 'S', 'C', 'G', 'D', 'R', 'H', 'A', 'L', {-3, 3, 0}, 'Z', {"B7", 'I', 0, 'F','S','C','G','D','R','H','A','L',{-4,3,0}, 'Z','B','M','@','g','d','K','z','Q','b','m','f','e','\f', 0, '!','s','N', 0, 0, 't', 0, 0},
'B', 'M', '@', 0, 0, 0, 0, 0, 0, 'm', 'f', 'e', 0, 0, 0, 0, 0, 0, 0, 0, 0, {"B8", 'I', 0, 'F','S','C','G','D','R','H','A','L',{-4,3,0}, 'Z','B','M','@','g','d','K','z','Q','b','m','f','e','\f', 0x19,'!','s','N', 0, 0, 0, 'p','q'},
0}, {"F5", 'I', 0, 'F','S','C','G','D','R','H','A','L',{-3,3,0}, 'Z', 0, 'M','@','g','d','K','z','Q', 0, 'm','f','e','\f', 0, 0, 0, 'N','T','P', 0, 0, 0},
{"B4", 'I', 0, 'F', 'S', 'C', 'G', 'D', 'R', 'H', 'A', 'L', {-3, 3, 0}, 'Z', {"D1", 'I','i','F', 0, 'C','G','D','R', 0, 'A', 0, {0,0,0}, 'Z', 0, 0, '@','g','d', 0, 'z', 0, 0, 0, 'f', 0, 0, 0, '!', 0, 0, 0, 0, 0, 0, 0},
'B', 'M', '@', 'g', 'd', 0, 'z', 'Q', 'b', 'm', 'f', 'e', 0, 0, 0, 0, 0, 0, {"D7", 'I','i','F', 0, 'C','G','D','R', 0, 'A', 0, {0,0,0}, 'Z', 0, 0, '@','g','d', 0, 'z', 0, 0, 0, 'f', 0, 0, 0, '!', 0, 0, 0, 0, 0, 0, 0},
0, 0, 0, 0}, {"D8", 'I','i','F', 0, 'C','G','D','R', 0, 'A', 0, {0,0,0}, 'Z', 0, 0, '@','g','d', 0, 'z', 0, 0, 0, 'f','e', 0, 0, '!', 0, 0, 0, 0, 0, 0, 0},
{"B5", 'I', 0, 'F', 'S', 'C', 'G', 'D', 'R', 'H', 'A', 'L', {-3, 3, 0}, 'Z',
'B', 'M', '@', 'g', 'd', 'K', 'z', 'Q', 'b', 'm', 'f', 'e', 0, 0, 0, 0, 0,
0, 0, 0, 0, 0},
{"B6", 'I', 0, 'F', 'S', 'C', 'G', 'D', 'R', 'H', 'A', 'L', {-3, 3, 0}, 'Z',
'B', 'M', '@', 'g', 'd', 'K', 'z', 'Q', 'b', 'm', 'f', 'e', 0, 0, 0, 0, 0,
0, 0, 0, 0, 0},
{"B7", 'I', 0, 'F', 'S', 'C', 'G', 'D', 'R', 'H', 'A', 'L', {-4, 3, 0}, 'Z',
'B', 'M', '@', 'g', 'd', 'K', 'z', 'Q', 'b', 'm', 'f', 'e', '\f', 0, '!',
's', 'N', 0, 0, 't', 0, 0},
{"B8", 'I', 0, 'F', 'S', 'C', 'G', 'D', 'R', 'H', 'A', 'L', {-4, 3, 0}, 'Z',
'B', 'M', '@', 'g', 'd', 'K', 'z', 'Q', 'b', 'm', 'f', 'e', '\f', 0x19,
'!', 's', 'N', 0, 0, 0, 'p', 'q'},
{"F5", 'I', 0, 'F', 'S', 'C', 'G', 'D', 'R', 'H', 'A', 'L', {-3, 3, 0}, 'Z',
0, 'M', '@', 'g', 'd', 'K', 'z', 'Q', 0, 'm', 'f', 'e', '\f', 0, 0, 0, 'N',
'T', 'P', 0, 0, 0},
{"D1", 'I', 'i', 'F', 0, 'C', 'G', 'D', 'R', 0, 'A', 0, {0, 0, 0}, 'Z', 0,
0, '@', 'g', 'd', 0, 'z', 0, 0, 0, 'f', 0, 0, 0, '!', 0, 0, 0, 0, 0, 0, 0},
{"D7", 'I', 'i', 'F', 0, 'C', 'G', 'D', 'R', 0, 'A', 0, {0, 0, 0}, 'Z', 0,
0, '@', 'g', 'd', 0, 'z', 0, 0, 0, 'f', 0, 0, 0, '!', 0, 0, 0, 0, 0, 0, 0},
{"D8", 'I', 'i', 'F', 0, 'C', 'G', 'D', 'R', 0, 'A', 0, {0, 0, 0}, 'Z', 0,
0, '@', 'g', 'd', 0, 'z', 0, 0, 0, 'f', 0, 0, 0, '!', 0, 0, 0, 0, 0, 0, 0},
}; };
@ -2508,7 +2488,9 @@ attach (const char *dev_name, Epson_Device * *devp, int type)
s->hw->cmd->feed = 0x19; s->hw->cmd->feed = 0x19;
} }
else if (strcmp ("GT-8200", dev->sane.model) == 0 || else if (strcmp ("GT-8200", dev->sane.model) == 0 ||
strcmp ("Perfection1650", dev->sane.model) == 0) strcmp ("Perfection1650", dev->sane.model) == 0 ||
strcmp ("Perfection1640", dev->sane.model) == 0 ||
strcmp ("GT-8700", dev->sane.model) == 0)
{ {
s->hw->cmd->feed = 0; s->hw->cmd->feed = 0;
s->hw->cmd->set_focus_position = 0; s->hw->cmd->set_focus_position = 0;
@ -3891,7 +3873,7 @@ setvalue (SANE_Handle handle, SANE_Int option, void *value, SANE_Int * info)
int optindex; int optindex;
SANE_Bool reload = SANE_FALSE; SANE_Bool reload = SANE_FALSE;
DBG (5, "setvalue(option = %d, value = %p\n", option, value); DBG (5, "setvalue(option = %d, value = %p)\n", option, value);
status = sanei_constrain_value (sopt, value, info); status = sanei_constrain_value (sopt, value, info);
@ -4182,7 +4164,10 @@ sane_get_parameters (SANE_Handle handle, SANE_Parameters * params)
{ {
DBG (5, "Returning saved params structure\n"); DBG (5, "Returning saved params structure\n");
if (params != NULL) if (params != NULL)
*params = s->params; {
DBG(1, "Restoring parameters from saved parameters\n");
*params = s->params;
}
DBG (3, "Preview = %d\n", s->val[OPT_PREVIEW].w); DBG (3, "Preview = %d\n", s->val[OPT_PREVIEW].w);
DBG (3, "Resolution = %d\n", s->val[OPT_RESOLUTION].w); DBG (3, "Resolution = %d\n", s->val[OPT_RESOLUTION].w);
@ -4236,7 +4221,6 @@ sane_get_parameters (SANE_Handle handle, SANE_Parameters * params)
SANE_UNFIX (s->val[OPT_TL_Y].w), SANE_UNFIX (s->val[OPT_BR_X].w), SANE_UNFIX (s->val[OPT_TL_Y].w), SANE_UNFIX (s->val[OPT_BR_X].w),
SANE_UNFIX (s->val[OPT_BR_Y].w)); SANE_UNFIX (s->val[OPT_BR_Y].w));
print_params (s->params);
/* /*
* Calculate bytes_per_pixel and bytes_per_line for * Calculate bytes_per_pixel and bytes_per_line for
@ -4294,6 +4278,8 @@ sane_get_parameters (SANE_Handle handle, SANE_Parameters * params)
if (NULL != params) if (NULL != params)
*params = s->params; *params = s->params;
print_params (s->params);
return SANE_STATUS_GOOD; return SANE_STATUS_GOOD;
} }
@ -4350,7 +4336,7 @@ sane_start (SANE_Handle handle)
DBG (1, "You may have to power %s your TPU\n", DBG (1, "You may have to power %s your TPU\n",
s->hw->use_extension ? "on" : "off"); s->hw->use_extension ? "on" : "off");
DBG (1, "Also you may have to restart the Sane frontend."); DBG (1, "Also you may have to restart the Sane frontend.\n");
close_scanner (s); close_scanner (s);
return status; return status;
} }
@ -5869,8 +5855,12 @@ get_identity_information (SANE_Handle handle)
int n; int n;
for (n = 0; n < NELEMS (epson_cmd); n++) for (n = 0; n < NELEMS (epson_cmd); n++)
if (!strncmp (&ident->type, epson_cmd[n].level, 2)) {
break; char type_level[3];
sprintf(type_level, "%c%c", ident->type, ident->level);
if (!strncmp (type_level, epson_cmd[n].level, 2))
break;
}
if (n < NELEMS (epson_cmd)) if (n < NELEMS (epson_cmd))
{ {
@ -5880,7 +5870,7 @@ get_identity_information (SANE_Handle handle)
{ {
dev->cmd = &epson_cmd[EPSON_LEVEL_DEFAULT]; dev->cmd = &epson_cmd[EPSON_LEVEL_DEFAULT];
DBG (1, "Unknown type %c or level %c, using %s\n", DBG (1, "Unknown type %c or level %c, using %s\n",
ident->buf[0], ident->buf[1], dev->cmd->level); ident->type, ident->level, dev->cmd->level);
} }
s->hw->level = dev->cmd->level[1] - '0'; s->hw->level = dev->cmd->level[1] - '0';

Wyświetl plik

@ -24,6 +24,7 @@ SANE_Word sanei_epson_usb_product_ids[] = {
0x128, /* GT-X700 / Perfection 4870 */ 0x128, /* GT-X700 / Perfection 4870 */
0x801, /* CC-600 / CX-5[1234]00 */ 0x801, /* CC-600 / CX-5[1234]00 */
0x802, /* CC-570 / CX-3[12]00 */ 0x802, /* CC-570 / CX-3[12]00 */
0x805, /* CX-6400 */
0x806, /* PM-A850 / RX600 */ 0x806, /* PM-A850 / RX600 */
0x807, /* RX-500 */ 0x807, /* RX-500 */
0x808, /* CX-5400 */ 0x808, /* CX-5400 */