Wykres commitów

75 Commity (b49deae017ea893f0ffbca44fa1c26b54ee4fb11)

Autor SHA1 Wiadomość Data
Wolfram Sang eb42ad08d5 treewide: use SANE_CURRENT_* macros consistently
Backends use a mixture of SANE_CURRENT_{MAJOR | MINOR} and V_{MAJOR |
MINOR} with all kind of permutations. I was confused by this and one
comment in pieusb.c tells me I was not alone. Some items in old
changelogs suggest to use the SANE_CURRENT_ macros in backends, so let's
switch to do that with the exception of net.c and dll.c. Done with:

$ find backend -name '*.[ch]' | xargs sed -i '/nearly every/ ! { s/\<V_M/SANE_CURRENT_M/g }'
$ git checkout backend/net.c backend/dll.c

And manually removing the comment from pieusb.c. Everything still builds
fine.
2021-06-08 19:01:41 +02:00
Wolfram Sang 65b7e317a6 epson2: remove BUILD versioning
Makes no sense these days. Sane version is good enough.
2021-06-08 11:52:00 +02:00
Wolfram Sang c70426fde2 epson2: use longer USB timeout
With my 12000XL, using autofocus takes ~35 sec before scanning starts.
So, extend the default USB timeout.
2021-03-04 20:54:31 +01:00
Wolfram Sang 7139d6decf epson2: add autofocus
Enable autofocus support on my Epson 12000XL. The middle of the scan
area will be used as the focus point. An arbitrary X,Y is possible but
not implemented yet

Signed-off-by: Wolfram Sang <wsa@kernel.org>
2020-09-26 17:14:47 +02:00
Wolfram Sang 5d706c2c35 epson2: implement full range manual focus settings
Allow the whole range of manual focus settings as an expert option. This
is also now independent of a TPU being installed or not. The old default
values are applied if the user changes the source type (either FLATBED
or TPU). Adding a focus group here because autofocus options will come
with later patches.

Signed-off-by: Wolfram Sang <wsa@kernel.org>
2020-09-26 16:48:51 +02:00
Wolfram Sang a0e68f7de9 epson2: enable focus for all scanner types
Even with USB based scanners, we need to send the esci command to set
the focus. There is no byte in the extended scanning parameters for it.
So, move the code to a place where it is called for all cases.

Signed-off-by: Wolfram Sang <wsa@kernel.org>
2020-09-26 11:48:10 +02:00
Peter Marschall b2ce3110c6 spelling fixes for epson2 backend 2020-08-29 09:18:03 +02:00
pobrn 45f84a569c respect 'local_only' parameter of sane_get_devices()
Certain backends do network scans even if the 'local_only'
parameter for 'sane_get_devices()' is true. Fix that.

Changes:

1. Modify 'sanei_configure_attach()' so that backend specific
   data may be passed to the 'attach()' function.

2. Use this in certain backends to pass the value of the
   'local_only' parameter so that network related activities
   are only carried out when the value is false.
2020-08-12 12:29:38 +02:00
Olaf Meeuwissen 797cd1fb37 epson2, epsonds, kodakaio, magicolor: Don't set invalid value
If the value to be set is not valid, it should not change the sval
structure (even if doing so has no negative side effects).

This also makes the fallthrough less confusing by removing the first
cast of two for the br-x and br-y values.
2019-08-11 10:04:19 +09:00
Povilas Kanapickas e40596c2a5 Fix -Wimplicit-fallthrough warnings by adding standard annotations 2019-06-30 11:58:32 +03:00
Olaf Meeuwissen fa44970473 epson2: Fix [-Wunused-const-variable=] compiler warning
The s8_range variable appears to be a left-over from the epson
backend's "fork" and became superfluous after refactoring the
colour correction support in the epson2 backend.
2017-06-26 11:02:16 +09:00
Olaf Meeuwissen 23891a2646 .editorconfig: trim trailing whitespace 2017-05-29 21:14:29 +09:00
Alessandro Zummo d0e7675e60 epson2: added support for Perfection V800 (Nick Stroustrup) 2015-07-31 22:01:19 +02:00
Alessandro Zummo 980b4f6b06 epson2: fix compilation error 2015-05-15 20:01:32 +02:00
Alessandro Zummo 66a15edbcf epson2: consolidate cleanup 2015-05-12 03:18:37 +02:00
Alessandro Zummo 025f886f4b epson2: fix error message 2015-05-12 03:10:22 +02:00
Alessandro Zummo 5d3c2edb8f epson2: fixed depth > 8bit (thanks to Thomas M.) 2015-03-15 01:18:36 +01:00
Alessandro Zummo a73d9e1ab0 epson2: cancel requests were not handled correctly 2015-03-15 01:18:36 +01:00
Alessandro Zummo e855744b5c epson2: improve debug output 2014-03-03 23:56:28 +01:00
Alessandro Zummo 83b9767539 epson2: fixed detection of multiple network-enabled scanners 2014-03-03 23:56:28 +01:00
Alessandro Zummo 543393d90c close connection if an error occurs in the detection process 2013-08-29 11:33:24 +02:00
Alessandro Zummo 909aa82085 epson2: handle TPU2 as a separate transparency unit (Claus <claus@egehuset.dk>) 2011-12-25 02:43:14 +01:00
Chris Bagwell 2c4b1da0bf add FreeBSD Port's patches
epson2-commands.c: Include <sys/types.h> to resolve u_long.
epson2.c, magicolor.c, xerox_mfp-tcp.c: Include <sys/types.h>
and to <sys/socket.h> for anyone using setsockopt().
sanei_tcp.h: Include <sys/types.h> since ssize_t is referenced.
sanei_usb.c: Newer FreeBSD version checks.

All changes in this patch set come from FreeBSD ports patches.
Bug #312503.
2011-11-20 20:08:15 -06:00
Chris Bagwell 3125506715 revert broken sleep()->usleep conversion.
Got unit conversion wrong.
2011-11-10 18:39:12 -06:00
Chris Bagwell 50475719ef portabilty mods to epson2 backend
No behavior changes.  Wrap some optional headers with #ifdef's and
use usleep() instead of sleep() since it exist everywhere.
2011-11-09 21:50:18 -06:00
Alessandro Zummo 14d0ca4364 epson2: fixed segfault when attaching network devices 2010-12-12 13:56:52 +01:00
Alessandro Zummo e75d6e5e0c epson2: do not call set_color_correction_coefficients where unsupported 2010-04-04 17:07:06 +02:00
Alessandro Zummo 74c0db99eb epson2: disable thresholding by default 2010-04-04 17:05:34 +02:00
m. allan noah ff048f4176 add three new SANE_VALUE macros and use mode name macros from saneopts.h 2010-02-10 23:48:21 -05:00
Alessandro Zummo 63a8dd4ebc epson2: improved error detection 2010-01-09 23:21:50 +01:00
Alessandro Zummo 506c1be1a4 epson2: fixed handling of cancel requests 2010-01-09 22:08:41 +01:00
Alessandro Zummo 503f9a6d46 epson2: simplified color correction, built in profiles active by default 2010-01-09 17:24:33 +01:00
Alessandro Zummo 8013bd7acb epson2: improved debug messages and comments 2010-01-09 15:25:27 +01:00
Alessandro Zummo dd0e0dd7d4 epson2: fixed color shuffling bug for Perfection 610, added more debugging 2010-01-09 15:25:27 +01:00
Alessandro Zummo b7c37f5aef epson2: limit the capabilities of group options to SANE_CAP_ADVANCED 2010-01-04 02:59:42 +01:00
Alessandro Zummo d3eb202464 epson2: fixed sane_get_parameters and handlign of "net" string
in epson2.conf
2009-09-05 21:10:09 +02:00
Alessandro Zummo 017696919b epson2: add infrared support
Adds infrared support for GT-X800 and GT-X700. Can be tested
by enabling the infrared frame type in sane.h and using
tiffscan (http://code.google.com/p/tiffscan/)

 tiffscan --mode=infrared --scan
2009-06-27 17:33:23 +02:00
Alessandro Zummo 3730e34c91 epson2: added support for color correction profiles
Color correction profiles have been imported from the epkowa driver.
The user can specify his own or let the backend choice. The
feature is not enabled by default.

This feature is in beta stage, works only for color scans
and automatic mode.

Enable with --color-correction 'Automatic'
2009-06-22 22:43:07 +02:00
Alessandro Zummo a2e6237f6e epson2: code cleanup
Style and dead code cleanup.
2009-06-18 11:39:04 +02:00
Alessandro Zummo 2d89885211 epson2: fixed network issue 2009-06-18 02:00:30 +02:00
Alessandro Zummo e5bb03de2a epson2: removed unused code and options
Code and setup for never implemented or removed options
has been cleaned up.
2009-06-17 12:39:34 +02:00
Alessandro Zummo c8e84cd579 epson2: reinstated i18n in backend options
This reverts commit 45fef7b043.
2009-06-17 02:29:31 +02:00
Alessandro Zummo 3d223411cd epson2: avoid probing when device name is given
The code flow has been modified to avoid unnecessary probing
and double opening of a device. There's no more delay before
opening a networked scanner and the whole scan process begins
much earlier.

Accepted device names are:

 net:ipaddress
 net:hostname

 libusb:vendor:product

 pio:0xnnn

plus any form supported by the SANE scsi and usb
routines.

The code has been tested on network, scsi and libusb. Unfortunately
I do not have any parallel port based scanner.
2009-06-16 23:51:07 +02:00
Alessandro Zummo ebb98839d1 epson2: improved error detection in networking code, fixed buffer size
Error checking has been added when receiving the network
header and welcome message. Timeout has been added too and
a wrong buffer size has been corrected.
2009-06-16 17:27:27 +02:00
Alessandro Zummo 92f729ea83 epson2: removed invert image, cleaned up some code
Image inversion is something that can be handled by a frontend,
in the epson2 backend I want to avoid to add any complexity
that doesn't belong to the hardware.
2009-06-16 17:27:10 +02:00
Alessandro Zummo 45fef7b043 epson2: removed i18n from backend options
Internationalized backend options lead to incompatible shell
scripts, so they've been removed. A trailing dot has been removed
from some descriptions and a few includes moved around.
2009-06-16 17:27:10 +02:00
Alessandro Zummo e73177a177 epson2: allow get_devices to be called multiple times
The probing code has been streamlined and is now more maintenable.
The backend will probe when required and the get_devices hook can
be called multiple times. Transfer buffers are now selected based
on the connection type.
2009-06-10 21:09:05 +02:00
Alessandro Zummo 83b0f1f4f5 epson2: code style fixes
Minor code style fixes, like missing tabs, lenghty line, etc
2009-06-03 02:28:44 +02:00
Alessandro Zummo e1b835bf48 epson2: check for warming up condition after a start failure
Sometimes a "fatal error" is given back when the scanner is warming up.
The previousversion of the code checked for that issue only when
the ADF was in use.
2009-06-02 19:19:29 +02:00
Alessandro Zummo 728e032a5a epson2 reorganization
Some subroutines have been moved from epson2.c to epson2-ops.c and
there's also a temporary fix for the networking code.
This is work in progress but should work.
2009-06-02 01:03:33 +02:00