kopia lustrzana https://gitlab.com/sane-project/backends
epson2: fixed ADF detection
rodzic
0a37fc99f7
commit
3babe5de40
|
@ -177,7 +177,7 @@ e2_dev_init(Epson_Device *dev, const char *devname, int conntype)
|
||||||
SANE_Status
|
SANE_Status
|
||||||
e2_dev_post_init(struct Epson_Device *dev)
|
e2_dev_post_init(struct Epson_Device *dev)
|
||||||
{
|
{
|
||||||
int i;
|
int i, last;
|
||||||
|
|
||||||
DBG(5, "%s\n", __func__);
|
DBG(5, "%s\n", __func__);
|
||||||
|
|
||||||
|
@ -231,7 +231,7 @@ e2_dev_post_init(struct Epson_Device *dev)
|
||||||
|
|
||||||
/* try to expand the resolution list where appropriate */
|
/* try to expand the resolution list where appropriate */
|
||||||
|
|
||||||
int last = dev->res_list[dev->res_list_size - 1];
|
last = dev->res_list[dev->res_list_size - 1];
|
||||||
|
|
||||||
DBG(1, "highest available resolution: %d\n", last);
|
DBG(1, "highest available resolution: %d\n", last);
|
||||||
|
|
||||||
|
@ -700,6 +700,11 @@ e2_discover_capabilities(Epson_Scanner *s)
|
||||||
*source_list_add++ = ADF_STR;
|
*source_list_add++ = ADF_STR;
|
||||||
dev->ADF = SANE_TRUE;
|
dev->ADF = SANE_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (buf[44] & EXT_IDTY_CAP1_ADFS) {
|
||||||
|
dev->duplex = SANE_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TPU */
|
/* TPU */
|
||||||
|
@ -901,25 +906,28 @@ e2_set_extended_scanning_parameters(Epson_Scanner * s)
|
||||||
|
|
||||||
char extensionCtrl;
|
char extensionCtrl;
|
||||||
extensionCtrl = (s->hw->use_extension ? 1 : 0);
|
extensionCtrl = (s->hw->use_extension ? 1 : 0);
|
||||||
if (s->hw->use_extension && (s->val[OPT_ADF_MODE].w == 1))
|
if (s->hw->use_extension && (s->val[OPT_ADF_MODE].w == 1)) {
|
||||||
extensionCtrl = 2;
|
extensionCtrl = 2;
|
||||||
|
}
|
||||||
|
|
||||||
/* Test for TPU2
|
/* Test for TPU2
|
||||||
* Epson Perfection 4990 Command Specifications
|
* Epson Perfection 4990 Command Specifications
|
||||||
* JZIS-0075 Rev. A, page 31
|
* JZIS-0075 Rev. A, page 31
|
||||||
*/
|
*/
|
||||||
if (s->hw->use_extension && s->hw->TPU2)
|
if (s->hw->use_extension && s->hw->TPU2) {
|
||||||
extensionCtrl = 5;
|
extensionCtrl = 5;
|
||||||
|
}
|
||||||
|
|
||||||
if (s->val[OPT_MODE].w == MODE_INFRARED)
|
if (s->val[OPT_MODE].w == MODE_INFRARED) {
|
||||||
/* only infrared in TPU mode (NOT in TPU2 or flatbeth)
|
/* only infrared in TPU mode (NOT in TPU2 or flatbeth)
|
||||||
* XXX investigate this ... only tested on GT-X800
|
* XXX investigate this ... only tested on GT-X800
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (extensionCtrl == 1) /* test for TPU */
|
if (extensionCtrl == 1) /* test for TPU */
|
||||||
extensionCtrl = 3;
|
extensionCtrl = 3;
|
||||||
else
|
else
|
||||||
return SANE_STATUS_UNSUPPORTED;
|
return SANE_STATUS_UNSUPPORTED;
|
||||||
|
}
|
||||||
|
|
||||||
/* ESC e */
|
/* ESC e */
|
||||||
buf[26] = extensionCtrl;
|
buf[26] = extensionCtrl;
|
||||||
|
@ -2128,6 +2136,7 @@ e2_block_read(struct Epson_Scanner *s)
|
||||||
* RGB then swap the colors.
|
* RGB then swap the colors.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* never used, beta testers required */
|
||||||
needStrangeReorder =
|
needStrangeReorder =
|
||||||
(strstr(s->hw->model, "GT-2200") ||
|
(strstr(s->hw->model, "GT-2200") ||
|
||||||
((strstr(s->hw->model, "1640")
|
((strstr(s->hw->model, "1640")
|
||||||
|
|
|
@ -33,6 +33,7 @@ extern SANE_Status e2_add_resolution(Epson_Device *dev, int r);
|
||||||
extern void e2_set_fbf_area(Epson_Scanner *s, int x, int y, int unit);
|
extern void e2_set_fbf_area(Epson_Scanner *s, int x, int y, int unit);
|
||||||
extern void e2_set_adf_area(struct Epson_Scanner *s, int x, int y, int unit);
|
extern void e2_set_adf_area(struct Epson_Scanner *s, int x, int y, int unit);
|
||||||
extern void e2_set_tpu_area(struct Epson_Scanner *s, int x, int y, int unit);
|
extern void e2_set_tpu_area(struct Epson_Scanner *s, int x, int y, int unit);
|
||||||
|
extern void e2_set_tpu2_area(struct Epson_Scanner *s, int x, int y, int unit);
|
||||||
extern void e2_add_depth(Epson_Device *dev, SANE_Word depth);
|
extern void e2_add_depth(Epson_Device *dev, SANE_Word depth);
|
||||||
extern SANE_Status e2_discover_capabilities(Epson_Scanner *s);
|
extern SANE_Status e2_discover_capabilities(Epson_Scanner *s);
|
||||||
extern SANE_Status e2_set_extended_scanning_parameters(Epson_Scanner *s);
|
extern SANE_Status e2_set_extended_scanning_parameters(Epson_Scanner *s);
|
||||||
|
|
Ładowanie…
Reference in New Issue