From 74909ada85b100b5773fa9dfeed216b64618ee8d Mon Sep 17 00:00:00 2001 From: Eric Westphal Date: Thu, 22 Jun 2017 19:47:25 -0400 Subject: [PATCH] Ensure SensorQuaternion synced with IMUMapping. --- goflying | 2 +- main/managementinterface.go | 1 + main/sensors.go | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/goflying b/goflying index 2a2fd99f9..083dd940f 160000 --- a/goflying +++ b/goflying @@ -1 +1 @@ -Subproject commit 2a2fd99f9b9c0222344924b86d45f93d6f982cee +Subproject commit 083dd940f35eed0505f3cded7d8b6aa5f70b4e35 diff --git a/main/managementinterface.go b/main/managementinterface.go index 19c00cecb..062c00b91 100644 --- a/main/managementinterface.go +++ b/main/managementinterface.go @@ -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 diff --git a/main/sensors.go b/main/sensors.go index 43cc0da74..47fbd0dc6 100644 --- a/main/sensors.go +++ b/main/sensors.go @@ -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]