Skip to content

Commit 2ba3f13

Browse files
committed
Change http status messages for go1.5.1 compatibility.
1 parent f2cfe33 commit 2ba3f13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main/managementinterface.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -397,14 +397,14 @@ func handleOrientAHRS(w http.ResponseWriter, r *http.Request) {
397397
case 'f': // Set sensor "forward" direction (toward nose of airplane).
398398
if f, err = getMinAccelDirection(); err != nil {
399399
log.Printf("AHRS Error: sensor orientation: couldn't read accelerometer: %s\n", err)
400-
http.Error(w, fmt.Sprintf("couldn't read accelerometer: %s\n", err), http.StatusFailedDependency)
400+
http.Error(w, fmt.Sprintf("couldn't read accelerometer: %s\n", err), http.StatusBadRequest)
401401
return
402402
}
403403
log.Printf("AHRS Info: sensor orientation: received forward direction %d\n", f)
404404
case 'u': // Set sensor "up" direction (toward top of airplane).
405405
if u, err = getMinAccelDirection(); err != nil {
406406
log.Printf("AHRS Error: sensor orientation: couldn't read accelerometer: %s\n", err)
407-
http.Error(w, fmt.Sprintf("couldn't read accelerometer: %s\n", err), http.StatusFailedDependency)
407+
http.Error(w, fmt.Sprintf("couldn't read accelerometer: %s\n", err), http.StatusBadRequest)
408408
return
409409
}
410410
log.Printf("AHRS Info: sensor orientation: received up direction %d\n", u)

0 commit comments

Comments
 (0)