MCPcopy Create free account
hub / github.com/RustCV/RustCV / set_focus

Method set_focus

rustcv-backend-v4l2/src/controls.rs:93–105  ·  view source on GitHub ↗
(&self, focus: u32)

Source from the content-addressed store, hash-verified

91 }
92
93 fn set_focus(&self, focus: u32) -> Result<()> {
94 let _ = self.dev.set_control(Control {
95 id: CID_FOCUS_AUTO,
96 value: Value::Boolean(false),
97 });
98
99 self.dev
100 .set_control(Control {
101 id: CID_FOCUS_ABSOLUTE,
102 value: Value::Integer(focus as i64),
103 })
104 .map_err(CameraError::Io)
105 }
106}
107
108// --- 3. 系统控制 (System) ---

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected