Skip to content

Commit

Permalink
Fix some bad initializations.
Browse files Browse the repository at this point in the history
  • Loading branch information
westphae committed Jun 24, 2017
1 parent 74909ad commit fef0ed4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion goflying
Submodule goflying updated 1 files
+5 −2 mpu9250/mpu9250.go
1 change: 0 additions & 1 deletion main/sensors.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
3 changes: 0 additions & 3 deletions sensors/mpu9250.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit fef0ed4

Please sign in to comment.