kopia lustrzana https://gitlab.com/sane-project/backends
epsonds: enable double feed detection
rodzic
ccd15dc966
commit
b2aefab4cb
|
@ -607,11 +607,13 @@ static SANE_Status capa_cb(void *userdata, char *token, int len)
|
|||
|
||||
if (strncmp("ADFDFL1", token, 3 + 4) == 0) {
|
||||
DBG(1, " ADF: double feed detection\n");
|
||||
s->hw->adf_has_dfd = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (len == 8 && strncmp("ADFDFL1DFL2", token, 3 + 4) == 0) {
|
||||
DBG(1, " ADF: double feed detection (high sensitivity)\n");
|
||||
s->hw->adf_has_dfd = 2;
|
||||
}
|
||||
|
||||
if (strncmp("FMT", token, 3) == 0) {
|
||||
|
|
|
@ -1189,6 +1189,12 @@ sane_start(SANE_Handle handle)
|
|||
s->val[OPT_ADF_MODE].w ? "DPLX" : "",
|
||||
s->val[OPT_ADF_SKEW].w ? "SKEW" : "");
|
||||
|
||||
if (s->hw->adf_has_dfd == 2) {
|
||||
strcat(buf, "DFL2");
|
||||
} else if (s->hw->adf_has_dfd == 1) {
|
||||
strcat(buf, "DFL1");
|
||||
}
|
||||
|
||||
} else if (strcmp(source_list[s->val[OPT_SOURCE].w], FBF_STR) == 0) {
|
||||
|
||||
strcpy(buf, "#FB ");
|
||||
|
|
|
@ -138,6 +138,7 @@ struct epsonds_device
|
|||
SANE_Bool adf_has_load; /* supports load command */
|
||||
SANE_Bool adf_has_eject; /* supports eject command */
|
||||
SANE_Byte adf_alignment; /* left, center, right */
|
||||
SANE_Byte adf_has_dfd; /* supports double feed detection */
|
||||
|
||||
SANE_Bool has_tpu; /* tpu */
|
||||
SANE_Range tpu_x_range; /* transparency unit x range */
|
||||
|
|
Ładowanie…
Reference in New Issue