no really, I fixed the initialization bug

This commit is contained in:
Steven Polley 2020-10-29 03:18:36 +00:00
parent f457299f50
commit 300367c00b
1 changed files with 2 additions and 1 deletions

View File

@ -56,12 +56,13 @@ func main() {
fmt.Printf("Start reading device: %v\n", deviceID)
// This is a warm up ladies and gentlemen.
// This is a warm up ladies and gentlemen.
for i := 0; i < 20; i++ {
if ok := webcam.Read(&img); !ok {
fmt.Printf("Device closed: %v\n", deviceID)
return
}
detectMotion(img)
}
// main loop