[Prev][Next][Index][Thread]
Re: xfqcam not auto detecting cameras (fwd)
>
> I've seen some posts and gotten a few emails re: xfqcam's autoedetect
> feature. Unfortunately, auto detect is pretty unreliable, even on my
> own system. Sometimes
> it works great, othertimes it takes 2 or 3 tries, and others I have to
> explicitly name the port.
> I guess it was working great when I first tested it otherwise I wouldn't
> have included the feature.
> At any rate, the code is from Scott Laird's qcam library and his
> comments say that it isn't tested much. Back to the drawing board I
> guess.
That's one of the things I'm working on..
How to detect the lpt ports, then determine if it's a bi-directional,
and then determine if a Quickcam is connected to it.
The first part is easy; the so is the second part. The third part,
well, I think I'm going to cheat, and use the same technique that
the Windows QuickPic program does, and that is simply send a brightness
command with a timeout, and see if it times out. If not, there's a camera
there. If so, no camera, onto the next one..
So the psuedo code is:
for ( count = 0; count < 3; count++) {
camera[count].connected = FALSE;
if (check_lpt_port(camera[count].port) == EXISTS) {
resetcamera(&camera[count]);
if (sendcmd(&camera[count], QC_BRIGHTNESS, 150) == OK) {
camera[count].connected = TRUE;
}
}
}
This will be in the Sunday, Feb 4 released driver set. (if you want a
early copy, send me mail, and I'll tell you how to get it.)
--
Thomas Davis | Internet: Thomas.Davis@mnscorp.com
Systems Consultant | Snail Mail: Suite 528
Midwest Network Solutions Corp. | 1941 South 42nd Street
(402) 346-7687 | Omaha, NE 68105-2939