Skip to content

Instantly share code, notes, and snippets.

@banks
Created June 5, 2020 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save banks/97f7b54c07096b5e1540e5665a12cf5e to your computer and use it in GitHub Desktop.
Save banks/97f7b54c07096b5e1540e5665a12cf5e to your computer and use it in GitHub Desktop.
// Run with node fix-auto-focus.js
//
// This disables the broken auto-focus on Logitech cameras.
// It works for me on my Logictech 920.
var UVCControl = require('uvc-control');
var camera = new UVCControl(0x046d, 0x082d);
camera.get('autoFocus', function (error, value) {
console.log('Before AutoFocus setting:', value);
});
camera.set('autoFocus', 0, function (error) {
if (error != undefined) {
console.log('AutoFocus set error:', error);
}
});
camera.get('autoFocus', function (error, value) {
console.log('After AutoFocus setting:', value);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment