didn't remove prints lol

This commit is contained in:
Alex Janka 2023-03-19 15:46:23 +11:00
parent 7bd343ddec
commit dd6df41ac2
2 changed files with 1 additions and 12 deletions

View file

@ -16,7 +16,7 @@ impl Webcam {
let format = RequestedFormat::new::<pixel_format::LumaAFormat>(
RequestedFormatType::AbsoluteHighestResolution,
);
println!("creating webcam");
Self {
camera: SendWrapper::new(Camera::new(CameraIndex::Index(0), format).unwrap()),
buffer: [0; 128 * 128],
@ -26,7 +26,6 @@ impl Webcam {
impl PocketCamera for Webcam {
fn get_image(&mut self) -> [u8; 128 * 128] {
println!("getting image");
self.buffer
}
@ -34,18 +33,12 @@ impl PocketCamera for Webcam {
let height = self.camera.resolution().height() as usize;
let width = self.camera.resolution().width() as usize;
let frame = self.camera.frame_raw().expect("couldn't get frame");
println!(
"buffer length: {}, resolution length: {}",
frame.len(),
width * height
);
for y in 0..128 {
for x in 0..128 {
self.buffer[y * 128 + x] = frame[((y * width) + x) * 2];
}
}
println!("captured");
}
fn init(&mut self) {

View file

@ -108,12 +108,8 @@ fn main() {
.with_verbose(args.verbose)
.with_tile_window(tile_window);
println!("made options");
let mut core = EmulatorCore::init(receiver, options);
println!("made core");
match args.step_by {
Some(step_size) => loop {
core.run_stepped(step_size);