Hi Gilles, sorry for the late reply.
On Sunday 08 February 2009 05:06:25 Gilles GIGAN wrote: > Hi, > I have checked out the latest v4l code from the mercurial repository on > linuxtv.org, and successfully compiled and loaded the uvcvideo module, > which I tested with a logitech quickcam sphere af (046d:0994). I have > comments and questions regarding the V4L2 controls to pilot the pan and > tilt motors: After mapping the dynamic controls (with uvcdynctrl), the > following controls become available: > - Pan Reset: min: 0, max: 1, step: 1, type: integer > - Tilt Reset: min 0, max: 1, step: 0, type: integer (note the step value of > 0 which should really be 1 here) > - Pan (Relative): min: 4480, max: 4480, step: 1, type: integer > - Tilt (Relative): min: 1920, max: 1920, step: 1, type: integer > - Pan/tilt Reset: min: 0, max: 3, step: 1, type: integer > Creating a user interface based on these controls is quite hard because of > their types and step values: > Trying to set a value of 0 on any of the Reset controls fails, even though > 0 is reported as an acceptable value. > Setting a value of 1 on either Pan (Relative) or Tilt (Relative) succeeds > but results in no movement. > Keeping the GUI up-to-date is not possible because calling > ioctl(VIDIOC_G_CTRL) on any of these controls fails (which makes sense when > you know what the controls are). But from a programming point of view, if > you try to create an interface that will work with any controls, the way > these are reported (integers) makes it almost impossible to keep track of. > I have a couple of suggestions to improve this, and would appreciate > comments on them: > - Reporting the Pan/Tilt Reset control as a menu and Pan Reset and Tilt > Reset as buttons instead of integers, will solve the previously mentioned > issues. Agreed. Pan Reset and Tilt Reset controls should be reported as buttons. The Pan/Tilt Reset control should in my opinion go away. > - Change the Pan (Relative) and Tilt (relative) step value to one that > actually results in a slight movement of the camera. Now this is gonna be trickier. The step value is reported by the device itself, and it seems the device gets it wrong :-/ > Is there a way to make these changes when mapping the controls, or do they > have to be coded in the driver itself ? Switching the Pan Reset and Tilt Reset from integers to button should require a modification of the logitech.xml file only (although it might also trigger bugs in yet unused code paths of libwebcam/uvcdynctrl). Best regards, Laurent Pinchart _______________________________________________ Linux-uvc-devel mailing list [email protected] https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
