kopia lustrzana https://github.com/cyoung/stratux
Fix some bad initializations.
rodzic
74909ada85
commit
fef0ed466f
2
goflying
2
goflying
|
@ -1 +1 @@
|
|||
Subproject commit 083dd940f35eed0505f3cded7d8b6aa5f70b4e35
|
||||
Subproject commit c896f766083f44a7a27f1a607ef6f473c4209a29
|
|
@ -129,7 +129,6 @@ func initIMU() (ok bool) {
|
|||
imu, err := sensors.NewMPU9250()
|
||||
if err == nil {
|
||||
myIMUReader = imu
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
log.Println("AHRS Info: Successfully connected MPU9250")
|
||||
return true
|
||||
}
|
||||
|
|
|
@ -36,13 +36,10 @@ func NewMPU9250() (*MPU9250, error) {
|
|||
}
|
||||
|
||||
// Set Gyro (Accel) LPFs to 20 (21) Hz to filter out prop/glareshield vibrations above 1200 (1260) RPM
|
||||
log.Println("AHRS Info: Setting MPU9250 LPF")
|
||||
mpu.SetGyroLPF(21)
|
||||
mpu.SetAccelLPF(21)
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
|
||||
m.mpu = mpu
|
||||
|
||||
log.Println("AHRS Info: monitoring IMU")
|
||||
return &m, nil
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue