kopia lustrzana https://github.com/cyoung/stratux
Remove some old AHRS logging.
rodzic
22fe8cddbe
commit
b4f437aa3d
|
@ -44,7 +44,6 @@ func pollSensors() {
|
||||||
|
|
||||||
// If it's not currently connected, try connecting to pressure sensor
|
// If it's not currently connected, try connecting to pressure sensor
|
||||||
if globalSettings.BMP_Sensor_Enabled && !globalStatus.BMPConnected {
|
if globalSettings.BMP_Sensor_Enabled && !globalStatus.BMPConnected {
|
||||||
log.Println("AHRS Info: attempting pressure sensor connection.")
|
|
||||||
globalStatus.BMPConnected = initPressureSensor() // I2C temperature and pressure altitude.
|
globalStatus.BMPConnected = initPressureSensor() // I2C temperature and pressure altitude.
|
||||||
go tempAndPressureSender()
|
go tempAndPressureSender()
|
||||||
}
|
}
|
||||||
|
@ -125,7 +124,6 @@ func tempAndPressureSender() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func initIMU() (ok bool) {
|
func initIMU() (ok bool) {
|
||||||
log.Println("AHRS Info: attempting to connect to MPU9250")
|
|
||||||
imu, err := sensors.NewMPU9250()
|
imu, err := sensors.NewMPU9250()
|
||||||
if err == nil {
|
if err == nil {
|
||||||
myIMUReader = imu
|
myIMUReader = imu
|
||||||
|
@ -135,7 +133,7 @@ func initIMU() (ok bool) {
|
||||||
|
|
||||||
// TODO westphae: try to connect to MPU9150 or other IMUs.
|
// TODO westphae: try to connect to MPU9150 or other IMUs.
|
||||||
|
|
||||||
log.Println("AHRS Error: couldn't initialize MPU9250")
|
log.Println("AHRS Error: couldn't initialize an IMU")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
package sensors
|
package sensors
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"log"
|
|
||||||
|
|
||||||
"../goflying/mpu9250"
|
"../goflying/mpu9250"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -28,7 +26,6 @@ func NewMPU9250() (*MPU9250, error) {
|
||||||
err error
|
err error
|
||||||
)
|
)
|
||||||
|
|
||||||
log.Println("AHRS Info: Making new MPU9250")
|
|
||||||
mpu, err = mpu9250.NewMPU9250(gyroRange, accelRange, updateFreq, true, false)
|
mpu, err = mpu9250.NewMPU9250(gyroRange, accelRange, updateFreq, true, false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -39,7 +36,6 @@ func NewMPU9250() (*MPU9250, error) {
|
||||||
mpu.SetAccelLPF(21)
|
mpu.SetAccelLPF(21)
|
||||||
|
|
||||||
m.mpu = mpu
|
m.mpu = mpu
|
||||||
log.Println("AHRS Info: monitoring IMU")
|
|
||||||
return &m, nil
|
return &m, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue