mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Use VID/PID detection for PS3Eye (#1977)
This commit is contained in:
@@ -1192,8 +1192,14 @@ void UsbCameraImpl::SetQuirks() {
|
||||
wpi::StringRef desc = GetDescription(descbuf);
|
||||
m_lifecam_exposure =
|
||||
desc.endswith("LifeCam HD-3000") || desc.endswith("LifeCam Cinema (TM)");
|
||||
m_ps3eyecam_exposure =
|
||||
desc.endswith("Camera-B4.04.27.1") || desc.endswith("Camera-B4.09.24.1");
|
||||
|
||||
int deviceNum = GetDeviceNum(m_path.c_str());
|
||||
if (deviceNum >= 0) {
|
||||
int vendorId, productId;
|
||||
if (GetVendorProduct(deviceNum, &vendorId, &productId)) {
|
||||
m_ps3eyecam_exposure = vendorId == 0x2000 && productId == 0x0145;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UsbCameraImpl::SetProperty(int property, int value, CS_Status* status) {
|
||||
|
||||
Reference in New Issue
Block a user