bool, true and false are keywords in the standard C23 - the sm3600
backend defines them on its own, which is forbidden with the new
standard.
The patch adds ifdef guards for the affected typedef - the old code
will be used for older standards, C23 will define TBool as bool.
The Xerox Book Scanner 4167 is a rebadged Avision FB6080E with modified USB IDs. It works perfectly with the existing support in the avision backend for the Avision FB6080E.
There is very little information about this model available online. From what I could find, it seems this model was distributed as a component, along with a pre-configured PC running Scannx software, of the Xerox BookCentre S7141 turn-key institutional book scanning system.
Apply gamma correction to image in find_origin and find_margin
to allow correct detection with cold lamp.
Also find 4 consecutive white pixels (instead of one) in find_margin.
Make 100dpi scanning (and preview) really work.
Register 0x7a is x-divider, setting it to 2 divides the 200dpi horizontal
resolution to 100dpi.
So the amount of data is halved but the scanning area and shading data must
be set as when scanning at 200dpi.
There is an bidirectional Unicode character <202d> in the comment.
The character looks like a typo, because it does not look fitting
there, so IMHO it can be removed.
Checking tools like rpminspect are wary of Unicode characters in the
code after CVE regarding bidirectional Unicode characters from several
years ago, and character <202d> is for left-to-right override in
Unicode, so tools report them as an issue.
- re-ordered the new option into the block of enums for the panel
- re-ordered the code to reflect the new value of OPT_FUNCTION_NUMBER
- corrected size of variable panel_read to include the new option OPT_FUNCTION_NUMBER
This change adds support for the function number configuration on the
Canon DR-3010C panel display. The function number can be used to
start different actions by "scanbd" when the start button is hit.
Support in scanbd must be configured appropriately.
The new SANE sensor has the name "function-number".
Not only the Perfection1650, but other scanners need to ignore the
FSG_STATUS_CANCEL_REQ bit as well. Thanks to @matc for debugging and
providing a list. Should fix#716. Remove the hardcoded bitmask while
here.
Signed-off-by: Wolfram Sang <wsa@kernel.org>
- Stopping and releasing the device causes the ADF to purge any remaining pages,
thus only the first page gets properly scanned (observed with Samsung
SCX-4729FW).
- Instead, when sourcing from the ADF, at each page's completion it should
continue and issue "OBJECT POSITION" command to proceed to the next page.
- Once all pages have been processed, the subsequent "OBJECT POSITION" command
returns the proper "CHECK CONDITION" status (ADF is empty) and triggers the
device stop and release.
- Additionally, the status of the ADF (loaded/empty) needs to be requeried
at the `sane_start()` for proper handling of the "Auto" mode. Otherwise,
the scanning session retains the ADF state from the start of the session,
even though ADF will become empty. Thus the "Auto" mode will not properly
switch to Flatbed as intended in the client application (observed in
Simple-Scan).
> NOTE: the initial "READ" command in `sane_start()` is extraneous and
> appears to always return STATUS_BUSY (indeed, the scanner is usually
> busy loading the page). The actual READ is correctly done in
> `dev_acquire()`. It may appear benign in a single page scan mode, however,
> it becomes malfunctioning in the mutipage ADF mode. The initial READ,
> when successful, will cause the skipping of the read block from processing,
> as the actual processing is tied to content read from `dev_acquire()`.
>
> Therefore, the initial READ command in the `sane_start()` is removed.
Without this change, pixma scanning is currently broken (tested with Canon MP495). The stated reason for the workaround (libusb not supporting timeouts for interrupts) hasn't been true since 2010:
67d9ef7b68
1. Fixed scan to jpeg/png
2. Fixed bottom part of the image
3. Removed white pixels from the right part of the image
4. Adjusted physical dimensions of the scanning area