Re: sane-0.65 released

Michael Ritzert (Ritzert@t-online.de)
Mon, 06 Oct 1997 18:17:47 +0200 (CEST)

Hi everybody!

On 05-Oct-97 becka@rz.uni-duesseldorf.de wrote:
>Hi !
>
>> has there been any progress with respect to the MFS-12000SP problems which
>> were investigated in David's survey? Last version I tried was 0.62.
>We have tried to investigate it, but need more test-data.
>
>The problem with the Lineart mode hanging seems to be timing related and there
>is a hack for it by M. Ritzert. (R U reading ? Maybe you should send it to the
>list).

Oh, sorry. I sent it out, but it seems as though I had used my wrong email and
the list server therefore ignored the message.

Here it finally is:
---8<--- mustek.c.diff ---8<---

--- DIFF/mustek.c Mon Oct 6 19:30:33 1997
+++ mustek.c Mon Oct 6 19:23:02 1997
@@ -84,6 +84,7 @@
10 seconds. That's not really true for Mustek scanners operating
in certain modes, hence this limit. */
static double strip_height;
+static int lineartpatch;

static int num_devices;
static Mustek_Device *first_dev;
@@ -349,7 +350,7 @@

dev->sane.name = strdup (devname);
dev->sane.vendor = "Mustek";
- dev->sane.model = strndup (model_name, 11);
+ dev->sane.model = strdup (model_name);
dev->sane.type = "flatbed scanner";

dev->x_range.min = 0;
@@ -876,6 +877,8 @@
line-distance correction and goes wild if they receive an LD
command. */
s->ld.peak_res = res;
+/* s->ld.c[1].dist = 0; s->ld.c[2].dist = 1; s->ld.c[3].dist = 2;*/
+/* s->ld.c[1].Qk = s->ld.c[2].Qk = s->ld.c[3].Qk = s->ld.max_value;*/
return SANE_STATUS_GOOD;
}

@@ -1618,6 +1621,7 @@
send_data (s, fp, bstat[rd].data, bstat[rd].lines, bpl, extra);
rd = (rd + 1) % NELEMS(bstat);
--num_reqs;
+ if ((s->mode == 0) && (lineartpatch == 1)) usleep( 200000 );
}
fclose (fp);
return SANE_STATUS_GOOD;
@@ -1643,6 +1647,8 @@
return SANE_STATUS_GOOD;
}

+ lineartpatch = 0;
+
while (fgets (dev_name, sizeof (dev_name), fp))
{
if (dev_name[0] == '#') /* ignore line comments */
@@ -1682,6 +1688,12 @@
DBG(2, "sane_init: strip-height set to %g inches\n",
strip_height);
}
+ }
+ else if (strncmp (str, "lineart-patch", 13) == 0 &&
+ (isspace (str[13]) || (str[13] == 0)))
+ {
+ lineartpatch = 1;
+ DBG(2, "sane_init: enabling lineart-patch\n");
}
else
DBG(1, "%s: ignoring unknown option `%s'\n",

--->8--- mustek.c.diff --->8---

It enables another option in mustek.conf: "option lineart-patch". Set it, if
you think you're troubled by the timing problem.

Ciao, Michael

---
    _
|\/|_)  -=> ritzert@cfg.hd.bw.schule.de <=-
|  | \  *Michael Ritzert* - http://home.t-online.de/home/ritzert

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com