sane-project-website/old-archive/1999-12/0120.html

252 wiersze
8.1 KiB
HTML

<!-- received="Sun Dec 19 16:16:22 1999 PST" -->
<!-- sent="Sun, 19 Dec 1999 16:16:20 -0800" -->
<!-- name="David Mosberger-Tang" -->
<!-- email="David.Mosberger@acm.org" -->
<!-- subject="forwarded message from Peter Fales" -->
<!-- id="199912200016.QAA10712@panda.mostang.com" -->
<!-- inreplyto="" -->
<title>sane-devel: forwarded message from Peter Fales</title>
<h1>forwarded message from Peter Fales</h1>
<b>David Mosberger-Tang</b> (<a href="mailto:David.Mosberger@acm.org"><i>David.Mosberger@acm.org</i></a>)<br>
<i>Sun, 19 Dec 1999 16:16:20 -0800</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#120">[ date ]</a><a href="index.html#120">[ thread ]</a><a href="subject.html#120">[ subject ]</a><a href="author.html#120">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0121.html">David Mosberger-Tang: "forwarded message from Stanislav Brabec"</a>
<li> <b>Previous message:</b> <a href="0119.html">Fred Willingham: "Re: Mustek 12000SP / V1.00"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>
<!-- body="start" -->
--pZZmKD1tXo<br>
Content-Type: text/plain; charset=us-ascii<br>
Content-Transfer-Encoding: 7bit<br>
<p>
I'm resending this as I currently don't have the time to do much SANE<br>
development. Could someone merge this patch into the CVS tree?<br>
<p>
Thanks,<br>
<p>
--david<br>
<p>
<p>
--pZZmKD1tXo<br>
Content-Type: message/rfc822<br>
Content-Transfer-Encoding: 7bit<br>
<p>
Mime-Version: 1.0<br>
Content-Type: multipart/mixed; boundary=dDRMvlgZJXvWKvBx<br>
Return-Path: &lt;<a href="mailto:psfales@lucent.com">psfales@lucent.com</a>&gt;<br>
Received: from localhost (dyn1-tnt4-67.chicago.il.ameritech.net [199.179.164.67])<br>
by panda.mostang.com (8.9.3/8.9.3) with SMTP id SAA05007<br>
for &lt;davidm@mostang.com&gt;; Tue, 14 Dec 1999 18:07:42 -0800<br>
Received: from localhost (4764 bytes) by localhost<br>
via sendmail with P:stdio/R:inet_hosts/T:smtp<br>
(sender: &lt;psfales&gt;) (ident &lt;psfales&gt; using unix)<br>
id &lt;m11y3rQ-00AIp8C@localhost&gt;<br>
for &lt;davidm@mostang.com&gt;; Tue, 14 Dec 1999 20:08:12 -0600 (CST)<br>
(Smail-3.2.0.101 1997-Dec-17 #3 built 1999-Jul-8)<br>
Message-ID: &lt;<a href="mailto:19991214200811.A22601@lucent.com">19991214200811.A22601@lucent.com</a>&gt;<br>
X-Mailer: Mutt 0.95i<br>
From: Peter Fales &lt;<a href="mailto:psfales@lucent.com">psfales@lucent.com</a>&gt;<br>
To: David Mosberger-Tang &lt;<a href="mailto:davidm@mostang.com">davidm@mostang.com</a>&gt;<br>
Subject: Re: Kodak DC-20/25 Backend<br>
Date: Tue, 14 Dec 1999 20:08:12 -0600<br>
<p>
<p>
--dDRMvlgZJXvWKvBx<br>
Content-Type: text/plain; charset=us-ascii<br>
<p>
David,<br>
<p>
I saw that the 991212 version came out recently. Here are a few<br>
more patches to the DC-25 backend. I thought I sent these back in<br>
October, but apparently they didn't make it in:<br>
<p>
- The most significant is a retry capability for missing data or bad checksums<br>
in the data from the camera. This has resulted in a dramatic<br>
reduction in download failures.<br>
<p>
- Include HAVE_CFMAKERAW in config.h.in and dc25.c.<br>
<p>
- Updated dc25.desc<br>
<p>
- Symbol clash in xscanimage with recent version of the gimp library<br>
<p>
Peter Fales<br>
<p>
<p>
--dDRMvlgZJXvWKvBx<br>
Content-Type: text/plain; charset=us-ascii<br>
Content-Disposition: attachment; filename="sane-devel-19991212+DC25.patch"<br>
<p>
diff -r sane-devel-19991212/backend/dc25.c sane-devel-19991212+DC25/backend/dc25.c<br>
101a102<br>
<i>&gt; #include &lt;sane/config.h&gt;</i><br>
345a347,352<br>
<i>&gt; /*</i><br>
<i>&gt; * List of speeds to try to establish connection with the camera. </i><br>
<i>&gt; * Check 9600 first, as it's the speed the camera comes up in, then</i><br>
<i>&gt; * 115200, as that is the one most likely to be configured from a </i><br>
<i>&gt; * previous run</i><br>
<i>&gt; */</i><br>
347,348c354,356<br>
&lt; { B19200, { 0x19, 0x20 } },<br>
&lt; { B38400, { 0x38, 0x40 } },<br>
<pre>
---
&gt; #ifdef B115200
&gt; { B115200, { 0x11, 0x52 } },
&gt; #endif
352,354c360,361
&lt; #ifdef B115200
&lt; { B115200, { 0x11, 0x52 } }
&lt; #endif
<pre>
---
&gt; { B38400, { 0x38, 0x40 } },
&gt; { B19200, { 0x19, 0x20 } },
426c433
&lt; #ifdef HAVE_cfmakeraw
<pre>
---
&gt; #ifdef HAVE_CFMAKERAW
435c442
&lt; tty_new.c_cc[VTIME] = 10;
<pre>
---
&gt; tty_new.c_cc[VTIME] = 50;
584a592
&gt; int retries=0;
589,590c597,604
&lt; for (n = 0; n &lt; sz &amp;&amp; (r = read (fd, (char *)&amp;buf[n], sz - n)) &gt; 0; n += r)
&lt; ;
<pre>
---
&gt; while ( retries++ &lt; 5 ) {
&gt;
&gt; /*
&gt; * If this is not the first time through, then it must be
&gt; * a retry - signal the camera that we didn't like what
&gt; * we got. In either case, start filling the packet
&gt; */
&gt; if ( retries != 1 ) {
592,595c606,611
&lt; if (r &lt;= 0) {
&lt; DBG (2,"read_data: error: read returned -1\n");
&lt; return -1;
&lt; }
<pre>
---
&gt; DBG (2, "Attempt retry %d\n",retries);
&gt; c=0xe3;
&gt; if (write (fd, (char *)&amp;c, 1) != 1) {
&gt; DBG (2,"read_data: error: write ack\n");
&gt; return -1;
&gt; }
597,600c613
&lt; if (n &lt; sz || read (fd, &amp;rcsum, 1) != 1) {
&lt; DBG (2,"read_data: error: buffer underrun or no checksum\n");
&lt; return -1;
&lt; }
<pre>
---
&gt; }
602,603c615,621
&lt; for (i = 0, ccsum = 0; i &lt; n; i++)
&lt; ccsum ^= buf[i];
<pre>
---
&gt; for (n = 0; n &lt; sz &amp;&amp; (r = read (fd, (char *)&amp;buf[n], sz - n)) &gt; 0; n += r)
&gt; ;
&gt;
&gt; if (r &lt;= 0) {
&gt; DBG (2,"read_data: error: read returned -1\n");
&gt; continue;
&gt; }
605,607c623,637
&lt; if (ccsum != rcsum) {
&lt; DBG (2,"read_data: error: bad checksum (%02x != %02x)\n",rcsum, ccsum);
&lt; return -1;
<pre>
---
&gt; if (n &lt; sz || read (fd, &amp;rcsum, 1) != 1) {
&gt; DBG (2,"read_data: error: buffer underrun or no checksum\n");
&gt; continue;
&gt; }
&gt;
&gt; for (i = 0, ccsum = 0; i &lt; n; i++)
&gt; ccsum ^= buf[i];
&gt;
&gt; if (ccsum != rcsum) {
&gt; DBG (2,"read_data: error: bad checksum (%02x != %02x)\n",rcsum, ccsum);
&gt; continue;
&gt; }
&gt;
&gt; /* If we got this far, then the packet is OK */
&gt; break;
diff -r sane-devel-19991212/backend/dc25.desc sane-devel-19991212+DC25/backend/dc25.desc
4,5c4,5
&lt; :version "1.1" ; version of backend
&lt; :status :alpha ; :alpha, :beta, :stable, :new
<pre>
---
&gt; :version "1.2" ; version of backend
&gt; :status :beta ; :alpha, :beta, :stable, :new
7c7
&lt; :url "<a href="http://www.megsinet.net/~psfales/DC-25.html">http://www.megsinet.net/~psfales/DC-25.html</a>";
<pre>
---
&gt; :url "<a href="http://peter.fales.com/DC-25.html">http://peter.fales.com/DC-25.html</a>";
13c13
&lt; :comment "DC-20 is untested!" ;
<pre>
---
&gt; :comment "DC-20 untested by author but reported to work" ;
diff -r sane-devel-19991212/frontend/xscanimage.c sane-devel-19991212+DC25/frontend/xscanimage.c
78c78
&lt; STANDALONE, GIMP_EXTENSION
<pre>
---
&gt; STANDALONE, GIMP_EXTENSION_FIX_COLLISION
304c304
&lt; scan_win.mode = GIMP_EXTENSION;
<pre>
---
&gt; scan_win.mode = GIMP_EXTENSION_FIX_COLLISION;
459c459
&lt; if (scan_win.mode == GIMP_EXTENSION)
<pre>
---
&gt; if (scan_win.mode == GIMP_EXTENSION_FIX_COLLISION)
806c806
&lt; if (scan_win.mode == GIMP_EXTENSION &amp;&amp; scan_win.tile)
<pre>
---
&gt; if (scan_win.mode == GIMP_EXTENSION_FIX_COLLISION &amp;&amp; scan_win.tile)
diff -r sane-devel-19991212/include/sane/config.h.in sane-devel-19991212+DC25/include/sane/config.h.in
325a326,328
&gt; /* Define if you have cfmakeraw() */
&gt; #undef HAVE_CFMAKERAW
&gt;
<p>
--dDRMvlgZJXvWKvBx--
<p>
--pZZmKD1tXo--
<p>
<pre>
--
Source code, list archive, and docs: <a href="http://www.mostang.com/sane/">http://www.mostang.com/sane/</a>
To unsubscribe: echo unsubscribe sane-devel | mail <a href="mailto:majordomo@mostang.com">majordomo@mostang.com</a>
</pre>
<!-- body="end" -->
<p>
<ul>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0121.html">David Mosberger-Tang: "forwarded message from Stanislav Brabec"</a>
<li> <b>Previous message:</b> <a href="0119.html">Fred Willingham: "Re: Mustek 12000SP / V1.00"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>