From 82b53f173a6f08c5ee952eaa97def3cff61c92f1 Mon Sep 17 00:00:00 2001 From: Omar Rizwan Date: Mon, 2 Oct 2023 16:56:20 -0400 Subject: camera,calibrate: Fixing really bad breakage from refactors (mostly undoing refactor; also pointer fix in calibrate) --- virtual-programs/camera.folk | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'virtual-programs') diff --git a/virtual-programs/camera.folk b/virtual-programs/camera.folk index 8f49393d..0e1710e7 100644 --- a/virtual-programs/camera.folk +++ b/virtual-programs/camera.folk @@ -17,28 +17,13 @@ set height $::Camera::HEIGHT On process { source pi/Camera.tcl - set camera [Camera::cameraOpen "/dev/video0" $width $height] - Camera::cameraInit $camera - Camera::cameraStart $camera - # skip 5 frames for booting a cam - for {set i 0} {$i < 5} {incr i} { - Camera::cameraFrame $camera - } + Camera::init $width $height puts "Camera tid: [getTid] booted at [clock milliseconds]" - fn grayFrame {} { - if {![Camera::cameraFrame $camera]} { - error "Failed to capture from camera" - } - set image [Camera::newImage $width $height 1] - Camera::cameraDecompressGray $camera $image - return $image - } - set ::oldFrames [list] When $::thisProcess has step count /c/ { - set frame [grayFrame] + set frame [Camera::grayFrame] Commit { Claim the camera time is $::stepTime Claim the camera frame is $frame at [clock milliseconds] -- cgit v1.2.3