kopia lustrzana https://github.com/cyoung/stratux
rodzic
f2cfe3344b
commit
2ba3f136bb
|
@ -397,14 +397,14 @@ func handleOrientAHRS(w http.ResponseWriter, r *http.Request) {
|
||||||
case 'f': // Set sensor "forward" direction (toward nose of airplane).
|
case 'f': // Set sensor "forward" direction (toward nose of airplane).
|
||||||
if f, err = getMinAccelDirection(); err != nil {
|
if f, err = getMinAccelDirection(); err != nil {
|
||||||
log.Printf("AHRS Error: sensor orientation: couldn't read accelerometer: %s\n", err)
|
log.Printf("AHRS Error: sensor orientation: couldn't read accelerometer: %s\n", err)
|
||||||
http.Error(w, fmt.Sprintf("couldn't read accelerometer: %s\n", err), http.StatusFailedDependency)
|
http.Error(w, fmt.Sprintf("couldn't read accelerometer: %s\n", err), http.StatusBadRequest)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
log.Printf("AHRS Info: sensor orientation: received forward direction %d\n", f)
|
log.Printf("AHRS Info: sensor orientation: received forward direction %d\n", f)
|
||||||
case 'u': // Set sensor "up" direction (toward top of airplane).
|
case 'u': // Set sensor "up" direction (toward top of airplane).
|
||||||
if u, err = getMinAccelDirection(); err != nil {
|
if u, err = getMinAccelDirection(); err != nil {
|
||||||
log.Printf("AHRS Error: sensor orientation: couldn't read accelerometer: %s\n", err)
|
log.Printf("AHRS Error: sensor orientation: couldn't read accelerometer: %s\n", err)
|
||||||
http.Error(w, fmt.Sprintf("couldn't read accelerometer: %s\n", err), http.StatusFailedDependency)
|
http.Error(w, fmt.Sprintf("couldn't read accelerometer: %s\n", err), http.StatusBadRequest)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
log.Printf("AHRS Info: sensor orientation: received up direction %d\n", u)
|
log.Printf("AHRS Info: sensor orientation: received up direction %d\n", u)
|
||||||
|
|
Ładowanie…
Reference in New Issue