Skip to content

Commit 2bcb198

Browse files
committed
Properly advertise PAN/TILT read-only/autoupdate capabilities
The Linux kernel added some more input sanitization with kernel 6.10.3 (specifically patch torvalds/linux@8641968). We could add a quirk fix to the kernel, but it's a bit easier to update the hardware as well to behave more correctly. This will permit reading position data from the BNO on Linux once again. Resolves: #13
1 parent 16a1558 commit 2bcb198

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed
-216 Bytes
Binary file not shown.
-216 Bytes
Binary file not shown.

Miniscope_DAQ/uvc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1624,7 +1624,8 @@ UVCHandleCameraTerminalRqts (void)
16241624
case CY_FX_UVC_CT_ZOOM_ABSOLUTE_CONTROL: // Unused
16251625
switch (bRequest) {
16261626
case CY_FX_USB_UVC_GET_INFO_REQ:
1627-
glEp0Buffer[0] = 3; /* Support GET/SET queries. */
1627+
/* we only support reading data from these controls */
1628+
glEp0Buffer[0] = UVC_CONTROL_CAP_GET | UVC_CONTROL_CAP_AUTOUPDATE;
16281629
CyU3PUsbSendEP0Data (1, (uint8_t *)glEp0Buffer);
16291630

16301631
break;

Miniscope_DAQ/uvc.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,13 @@
256256
#define CY_FX_UVC_VC_ERROR_CODE_INVALID_VAL_IN_RANGE (0x08)
257257
#define CY_FX_UVC_VC_ERROR_CODE_UNKNOWN (0xFF)
258258

259+
/* Capabilities */
260+
#define UVC_CONTROL_CAP_GET (1 << 0)
261+
#define UVC_CONTROL_CAP_SET (1 << 1)
262+
#define UVC_CONTROL_CAP_DISABLED (1 << 2)
263+
#define UVC_CONTROL_CAP_AUTOUPDATE (1 << 3)
264+
#define UVC_CONTROL_CAP_ASYNCHRONOUS (1 << 4)
265+
259266
/* Enum for a DMA reset event */
260267
typedef enum CyFxUvcDmaResetVal
261268
{

0 commit comments

Comments
 (0)