> Ian R. Justman wrote:
>
> [snip]
> >
> >
> > Here's the patch I came up with:
> >
> > --- apple.c.orig Wed Sep 2 00:35:21 1998
> > +++ apple.c Tue Sep 1 20:44:59 1998
> > @@ -2501,7 +2501,7 @@
> >
> > if (data_length)
> > {
> > - if (result[3] & 1) /* Scanner Blocked: Retrieve data */
> > + if ((result[3] & 1) || data_av) /* Scanner Blocked: Retrieve data */
> > {
> > DBG (IO_MESSAGE,
> > "sane_read: (status) Available in scanner buffer %u.\n",
> >
> > At the end of the scan, the block flag has been dropped, yet there might
> > be data in the scanner buffer. If the check for the block flag fails, it
> > immediately checks to see if there is any remaining data. If so, the
> > backend will empty the buffer for the last time.
> >
>
> Wait a minute. I have some questions.
>
> 1) What scanner do you have? (OneScanner or ColorOneScanner, both?)
I have the Color OneScanner.
> 2) How big is the internal buffer? (AppleScanner has 256 bytes)
I do not know. I just assumed that much of the stuff that applies to the
OneScanner also applies to the Color OneScanner. all of it does, but the
Color OneScanner has... well... color. :)
> 3) Before your patch: Does the backend was actually scanning? Did it
> open the lamp?
It does scan, but it doesn't retrieve the last bit of data, however, hence
the patch.
> 4) After you patch: Does everything works as expected? In all modes?
I tested it fully in the normal OneScanner modes. Color, as your notes
say, needs MUCH work.
> 5) If (4==TRUE) what about the round offs in scan area that are imposed
> by the specific model you have. Note that in case of an unexpected round
> offs the SANE may wait bigger/smaller image and that may lead to
> undesired warnings and cropped images.
No warnings, no cropped images, but the quantization algorithms introduce
some really neat effects when there are rounding problems. One mode I
tried does work right, but it yields a negative image. Otherwise, other
modes look like a horizontally-rolling picture on a TV set.
If you'd like, I'll mail you sample scans and debugging loggage off-list
for your perusal.
> Your patch looks that fixes a situation at the end of a scan. Although
> this is fine with me, the problems I had so far (other users actually
> had them) was that the scanner wasn't starting the scan at all.
Yes, my situation was that it reached the end of the scan, but there was
still data available, causing the scanner to remain busy because of the
logic problems in the status-checking code. The issue here was that the
scanner was presenting status that it was no longer blocked but data was
available. The code was transferring data ONLY when the scanner was
blocked, and at the end of the scan, not only was data still available,
the scanner was no longer in a blocked state, so said the block status
bit. Since the only test was on the blocking bit, the code was in a tight
loop waiting for that bit to be asserted, requiring me to CTRL-C out of
the frontend and powercycle the scanner.
As for the other situations, it could be possible that they might have an
older rev of the firmware.
> [snip]
>
> >
> > Cool. Any way I could get a copy of the most recent copy of the sources
> > to the Apple backend? I would lilke to see what's happening with it thus
> > far.
> >
>
> Nop there is no way to get newer sources than the ones that they are
> coming with the sane-0.74. I haven't code anything since then and I
> don't know anybody who did.
You had mentioned that someone had worked on getting color support
working, then mailed you the code mentioning that he didn't have the time
to fully maintain it. That's the code I am keenly interested in working
on, since I have the Color OneScanner.
--Ian.
-----
Ian R. Justman Postmaster, System Administrator, ChocoboNet
ianj@chocobo.org (home) ianj@calweb.com (work) NIC handle: IJ12
Try EsperNet IRC! Small and personal!
irc.esper.net takes you to a random server
Admin of chocobo.esper.net, ports 5555, 6666-6669, 7000, Nick: "IJ"
EsperNet Postmaster
I use Linux and FreeBSD, the ultimate "pane" relievers on the PC.
My heart AIX for a faster RS/6000
Hard Disk: n: Future windchimes
-- Source code, list archive, and docs: http://www.mostang.com/sane/ To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com