diff options
author | xengineering <mail2xengineering@protonmail.com> | 2021-06-18 10:00:10 +0200 |
---|---|---|
committer | xengineering <mail2xengineering@protonmail.com> | 2021-06-18 14:26:47 +0200 |
commit | 7634ee33120e7ef601ba1e806c63fe61c53e46bb (patch) | |
tree | 1a5225c9fefcc1bf69b143593c7c3001c0fbbc33 /src/camera.go | |
parent | 52972b810a9a42cef5c88f9947d64a0705f243ac (diff) | |
download | birdscan-7634ee33120e7ef601ba1e806c63fe61c53e46bb.tar birdscan-7634ee33120e7ef601ba1e806c63fe61c53e46bb.tar.zst birdscan-7634ee33120e7ef601ba1e806c63fe61c53e46bb.zip |
WIP: Implement Transport
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() { |