Ensure SensorQuaternion synced with IMUMapping.

pull/625/head v1.3b3
Eric Westphal 2017-06-22 19:47:25 -04:00
rodzic a2bba208b6
commit 74909ada85
3 zmienionych plików z 3 dodań i 1 usunięć

@ -1 +1 @@
Subproject commit 2a2fd99f9b9c0222344924b86d45f93d6f982cee
Subproject commit 083dd940f35eed0505f3cded7d8b6aa5f70b4e35

Wyświetl plik

@ -461,6 +461,7 @@ func handleOrientAHRS(w http.ResponseWriter, r *http.Request) {
saveSettings()
myIMUReader.Close()
globalStatus.IMUConnected = false // restart the processes depending on the orientation
CageAHRS()
log.Printf("AHRS Info: sensor orientation success! forward: %d; up: %d\n", f, u)
default: // Cancel the sensor calibration.
f = 0

Wyświetl plik

@ -209,6 +209,7 @@ func sensorAttitudeSender() {
}
if needsCage {
log.Println("AHRS Info: Caging")
ff = *makeSensorRotationMatrix([3]float64{c[0], c[1], c[2]})
f[0], f[1], f[2], f[3] = ahrs.RotationMatrixToQuaternion(ff)
globalSettings.SensorQuaternion[0] = f[0]