diff options
author | xengineering <mail2xengineering@protonmail.com> | 2021-06-15 15:51:38 +0200 |
---|---|---|
committer | xengineering <mail2xengineering@protonmail.com> | 2021-06-15 15:58:23 +0200 |
commit | 4a01c8e94921d9ddcaf6d6dee0feca4d9c3655a2 (patch) | |
tree | 634a3d6e380079d0da5e8fafaf866a33a63fb4bc /src/web.go | |
parent | 2269cc653577dffc58dba4ad5534583f28f224de (diff) | |
download | birdscan-4a01c8e94921d9ddcaf6d6dee0feca4d9c3655a2.tar birdscan-4a01c8e94921d9ddcaf6d6dee0feca4d9c3655a2.tar.zst birdscan-4a01c8e94921d9ddcaf6d6dee0feca4d9c3655a2.zip |
Refactoring: Camera has Statemachine and not is Statemachine
Diffstat (limited to 'src/web.go')
-rw-r--r-- | src/web.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -58,11 +58,11 @@ func jsHandler(w http.ResponseWriter, r *http.Request) { func stateHandler(w http.ResponseWriter, r *http.Request) { known_state := r.FormValue("known_state") - w.Write([]byte(fmt.Sprintf("%s", camera.GetStateOnChange(known_state)))) + w.Write([]byte(fmt.Sprintf("%s", camera.statemachine.GetStateOnChange(known_state)))) } func singlePictureHandler(w http.ResponseWriter, r *http.Request) { - camera.SendEvent("take_single_picture") + camera.statemachine.SendEvent("take_single_picture") fmt.Fprintf(w, http.StatusText(http.StatusOK)) } |