diff options
Diffstat (limited to 'src/camera.go')
-rw-r--r-- | src/camera.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/camera.go b/src/camera.go index cc29f54..e836cf3 100644 --- a/src/camera.go +++ b/src/camera.go @@ -50,7 +50,7 @@ func singlePicture(m *Machine) { // create command var cmd *exec.Cmd - if !debug { + if !config.Flag.Debug { cmd = exec.Command("python3", "/usr/lib/python3.9/site-packages/birdscan/") } else { cmd = exec.Command("python3", "../python/birdscan", "--debug") @@ -68,7 +68,7 @@ func singlePicture(m *Machine) { if err != nil { log.Print(err) } - data,err := io.ReadAll(stdout) + _,err = io.ReadAll(stdout) if err != nil { log.Print(err) } @@ -78,8 +78,9 @@ func singlePicture(m *Machine) { } // process result - log.Println(string(data)) m.SendEvent("single_picture_taken") + log.Println("Picture taken. Sending transport_request ...") + transporter.statemachine.SendEvent("transport_request") } func (cam *Camera) run() { |