For scanners which potentially have flipping duplexers, only enable
duplexing if there is an ADF present. This leads to the next problem, that
the flipping duplexers (present only on the HP 8200 series AFAIK) don't
always seem to be properly configured when powered up. To solve this some
magical values are written to magical memory locations, and some more
magical status is read back, causing an apparent firmware reset which
blocks communication for a short period of time. See adf_reset() for
details.
Added the AV_ADF_FLIPPING_DUPLEX flag to activate the flipping duplex code
only for models known to have such duplexing ADFs. Prior to this a doubious
huristic was used to guess when the hardware had a flipping duplex unit.
The additional_probe variable protected add_source_mode() and
add_color_mode() from being entered upon subsequent calls. These functions
were patched to not insert duplicate records in this case, removing the
need for the gatekeeper variable.
Until now the code has been changing the frontend supplied pointer to point
to our internal data structure. There are two problems with this. It
orphans the data previously associated with that pointer, which causes a
memory leak. It also gives the frontend the ability to munge our internal
data structure.
The only downside to this change is the possibility that a frontend took the
spec too literally and merely supplies a pointer but does not allocate
storage space for the result. Technically, the spec is a bit vague on this
point, because it does not specifically state who should allocate the
structure, but I feel a reasonable programmer would guess that space
allocation is a frontend obligation.
There was an old TODO in the code which suggests creating an option for using
the paper_length field to detect double feeds in the ADF. I've added it as
an option, but set the default to not use it since it might cause older
scanners to get confused.
I felt that the ehancements group was doing double duity for image tuning and
other more hardware related options. This new group takes ownership of those.
I'm not happy with the name, but that can always be changed.
- don't center window when using flatbed
- improve request sense error messages
- enable flatbed for all known models
- ad usb ids for DR-6030C, CR-135i & CR-190i
- moved DR-2020U to unsupported.desc
- initial support for DR-3080 and DR-5060
- add code to clamp scan width to an arbitrary byte width boundary
- add code to prevent setting of brightness/threshold/contrast
- don't send dropout color command on non-color scanners
-) LAN and USB communication
-) SNMP LAN auto-detection (using libsnmp, added configure check!)
-) Based on the epson2 backend, with many structural changes
-) B/W, Gray, Color scanning works in 150/300/600dpi (full-page
color scan only possible with <=300dpi)
-) The timeouts (SNMP, scan data, other data) are configurable in the
magicolor.conf file
-) Keeps list of known scanners in sane_get_devices, does not destroy
existing handles; Also correctly calls sanei_usb_init.
Added
void sanei_usb_set_endpoint (SANE_Int dn, SANE_Int ep_type, SANE_Int ep);
This function allows the user to set the endpoint to use on
the given device for the given endpoint type (e.g. bulk in).
Some scanners have multiple bulk in/out endpoints but use
only one for communication (not the one detected during auto-detection),
so one call to the new function will change the used endpoint.
Some scanners use two different endpoint for different purposes,
so in that case each read/write call needs to be preceeded
by a call to that function to set the proper endpoint.
ep_type is a bitmask and is usually of the form
(USB_DIR_IN|USB_ENDPOINT_TYPE_BULK)