We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents afd68a5 + edb2d4f commit 021ec45Copy full SHA for 021ec45
CameraController/UVC/Models/Controls/UVCControl.swift
@@ -31,6 +31,9 @@ class UVCControl {
31
}
32
33
func getDataFor(type: UVCRequestCodes, length: Int) -> Int {
34
+
35
+ guard uvcUnit >= 0 else { return 0 }
36
37
var value: Int = 0
38
39
let requestType = USBmakebmRequestType(direction: kUSBIn, type: kUSBClass, recipient: kUSBInterface)
@@ -60,6 +63,9 @@ class UVCControl {
60
63
61
64
62
65
func setData(value: Int, length: Int) -> Bool {
66
67
+ guard uvcUnit >= 0 else { return false }
68
69
var ref = value
70
71
let requestType = USBmakebmRequestType(direction: kUSBOut, type: kUSBClass, recipient: kUSBInterface)
0 commit comments