diff --git a/backend/teco1.c b/backend/teco1.c index c8d83280e..f35798054 100644 --- a/backend/teco1.c +++ b/backend/teco1.c @@ -146,6 +146,13 @@ static const struct scanners_supported scanners[] = { {1, 600, 1}, /* resolution */ 300, 600, /* max x and Y resolution */ 3 /* color 3 pass */ + }, + + {6, "TECO VM4542", + "Relisys", "RELI 4830", + {1, 400, 1}, /* resolution */ + 400, 400, /* max x and Y resolution */ + 1 /* color 1 pass */ } }; @@ -1893,12 +1900,15 @@ sane_start (SANE_Handle handle) return status; } +#if 0 + /* The windows driver does that, but some scanners don't like it. */ teco_vendor_spec (dev); if (status) { teco_close (dev); return status; } +#endif status = teco_send_gamma (dev); if (status) @@ -2030,7 +2040,7 @@ sane_read (SANE_Handle handle, SANE_Byte * buf, SANE_Int max_len, while ((buf_offset != max_len) && dev->bytes_left); DBG (DBG_info, "sane_read: leave, bytes_left=%ld\n", - (long) dev->bytes_left); + (long) dev->bytes_left); return SANE_STATUS_GOOD; } diff --git a/backend/teco1.conf b/backend/teco1.conf index da790ab02..d0d6e0416 100644 --- a/backend/teco1.conf +++ b/backend/teco1.conf @@ -5,4 +5,7 @@ scsi "RELISYS" "VM3530+" Scanner * * * 0 # Avec Color Office 2400 scsi "" "Image Scanner" Scanner +# Relisys RELI 4830 +scsi "RELISYS" "VM4542" Scanner + /dev/scanner diff --git a/backend/teco1.h b/backend/teco1.h index 879357970..aa71da021 100644 --- a/backend/teco1.h +++ b/backend/teco1.h @@ -215,8 +215,8 @@ getbitfield (unsigned char *pageaddr, int mask, int shift) /*--------------------------------------------------------------------------*/ #define MM_PER_INCH 25.4 -#define mmToIlu(mm) (((mm) * 300) / MM_PER_INCH) -#define iluToMm(ilu) (((ilu) * MM_PER_INCH) / 300) +#define mmToIlu(mm) (((mm) * dev->def->x_resolution_max) / MM_PER_INCH) +#define iluToMm(ilu) (((ilu) * MM_PER_INCH) / dev->def->x_resolution_max) /*--------------------------------------------------------------------------*/