Its probably better to assume the current code for the HV7131R sensor is in fact correct, though since i don't have one i don't know for sure myself. So yeah i would modify the patch so that it only reverses the values for the usb id of the dino lite.
On Fri, Apr 3, 2009 at 6:28 PM, Josua Grawitter <[email protected]> wrote: > Am Freitag 03 April 2009 18:27:56 schrieben Sie: >> Hi >> >> Sorry for mailing you directly, but I am still not able to post to the >> microdia group. Is the list moderated? >> >> I am working with the dino lite >> http://groups.google.com/group/microdia/web/a168-0614 >> which is a HV7131R based usb microscope. I have the problem that when >> the video starts the leds are turned *off* and when it stops the leds >> are turned *on*. >> >> I fixed it by simply reversing the order for the HV7131R led settings. >> This change is most likely to break the led support for other HV7131R >> based cameras. Should I change the code to check the USB id also or is >> this just a bug for the HV7131R led support? >> >> Thanks >> Lars Munch >> >> diff --git a/sn9c20x-bridge.c b/sn9c20x-bridge.c >> index 2cfc4a7..4994310 100644 >> --- a/sn9c20x-bridge.c >> +++ b/sn9c20x-bridge.c >> @@ -496,8 +496,11 @@ int sn9c20x_set_LEDs(struct usb_sn9c20x *dev, int >> enable) >> >> if (enable) { >> switch (sensor) { >> - case MT9M001_SENSOR: >> case HV7131R_SENSOR: >> + led[0] = 0xa0; >> + led[1] = 0xa0; >> + break; >> + case MT9M001_SENSOR: >> case SOI968_SENSOR: >> led[0] = 0x80; >> led[1] = 0xa0; >> @@ -522,6 +525,9 @@ int sn9c20x_set_LEDs(struct usb_sn9c20x *dev, int >> enable) >> } else { >> switch (sensor) { >> case HV7131R_SENSOR: >> + led[0] = 0x80; >> + led[1] = 0xa0; >> + break; >> case MT9M001_SENSOR: >> case MT9V011_SENSOR: >> led[0] = 0xa0; > > So far the button settings (GPIO) are all based on values from the logs. I > have no idea how they work. Therefore I can't tell how the windows driver > determines whether LEDs are available and which bits to flip. > > If changing this helps you - you can always keep a patch for your personal > repo and update it using: > $ git fetch > $ git rebase origin > > GWater > --~--~---------~--~----~------------~-------~--~----~ Lets make microdia webcams plug'n play, (currently plug'n pray) To post to this group, send email to [email protected] Visit us online https://groups.google.com/group/microdia -~----------~----~----~----~------~----~------~--~---
