kopia lustrzana https://gitlab.com/sane-project/backends
magicolor: don't use finish scan command on e-STUDIO devices
Original author wasn't sure about this command's real meaning. While it returns ok status upon running, following scans fail during parameters negotiation making scanner communication desynchronised. Don't use finish scan on e-STUDIO devices, it seems that only request error status suffices to confirm successful scan and makes further scans possible.merge-requests/864/head
rodzic
2ae58b0e6f
commit
19bd90800e
|
@ -797,8 +797,7 @@ cmd_finish_scan (SANE_Handle handle)
|
|||
return status;
|
||||
}
|
||||
memset (&returned[0], 0x00, 0x0b);
|
||||
/* e-STUDIO device returns 1 byte ack, while Magicolor 11 bytes */
|
||||
status = mc_txrx (s, buf, buflen, returned, ESTUDIO_DEVICE(s) ? 1 : 0x0b);
|
||||
status = mc_txrx (s, buf, buflen, returned, 0x0b);
|
||||
free (buf);
|
||||
if (status != SANE_STATUS_GOOD)
|
||||
DBG(8, "%s: Data NOT successfully sent\n", __func__);
|
||||
|
@ -1340,7 +1339,8 @@ mc_scan_finish(Magicolor_Scanner * s)
|
|||
s->buf = s->end = s->ptr = NULL;
|
||||
|
||||
/* TODO: Any magicolor command for "scan finished"? */
|
||||
status = cmd_finish_scan (s);
|
||||
if (!ESTUDIO_DEVICE(s))
|
||||
status = cmd_finish_scan (s);
|
||||
|
||||
status = cmd_request_error(s);
|
||||
if (status != SANE_STATUS_GOOD) {
|
||||
|
|
Ładowanie…
Reference in New Issue