Skip to content

Commit

Permalink
Add sized
Browse files Browse the repository at this point in the history
  • Loading branch information
fishrockz committed Jan 20, 2025
1 parent dc12aa5 commit 704a09a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion libcamera/examples/jpeg_capture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ fn main() {
.map(|buf| {
let mut req = cam.create_request(None).unwrap();
req.add_buffer(&stream, buf).unwrap();
req.controls_mut().set(Contrast(0.70));
req
})
.collect::<Vec<_>>();
Expand All @@ -88,7 +89,7 @@ fn main() {
println!("controls {:#?}", cam.controls());

let mut new_controls = ControlList::new();
new_controls.set(Contrast(0.9)).unwrap();
new_controls.set(Contrast(4.0)).unwrap();
cam.start(Some(&new_controls)).unwrap();

// Multiple requests can be queued at a time, but for this example we just want a single frame.
Expand Down
2 changes: 1 addition & 1 deletion libcamera/src/control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub enum ControlError {
}

pub trait ControlEntry:
Clone + Into<ControlValue> + TryFrom<ControlValue, Error = ControlValueError> + core::fmt::Debug
Clone + Sized + Into<ControlValue> + TryFrom<ControlValue, Error = ControlValueError> + core::fmt::Debug
{
const ID: u32;
}
Expand Down

0 comments on commit 704a09a

Please sign in to comment.