kopia lustrzana https://github.com/cyoung/stratux
Prepare for proper AHRS calculation
rodzic
5382012417
commit
bd2b303b59
|
@ -196,3 +196,12 @@ func (d *MPU6050) MagHeading() (float64, error) {return 0, nil}
|
|||
func (d *MPU6050) SlipSkid() (float64, error) {return 0, nil}
|
||||
func (d *MPU6050) RateOfTurn() (float64, error) {return 0, nil}
|
||||
func (d *MPU6050) GLoad() (float64, error) {return 0, nil}
|
||||
|
||||
func (d *MPU6050) ReadRaw() (int64, float64, float64, float64, float64, float64, float64, float64, float64, float64, error, error) {
|
||||
return 0, // Ts, time of last sensor reading
|
||||
0.0, 0.0, 0.0, // Gyro x, y, z
|
||||
0.0, 0.0, 0.0, // Accel x, y, z
|
||||
0.0, 0.0, 0.0, // Mag x, y, z
|
||||
errors.New("Error: ReadRaw() not implemented yet for MPU6050"),
|
||||
errors.New("Error: MPU6050 magnetometer isn't working on RY835AI chip")
|
||||
}
|
||||
|
|
|
@ -185,6 +185,10 @@ func (m *MPU9250) GLoad() (float64, error) {
|
|||
}
|
||||
}
|
||||
|
||||
func (m *MPU9250) ReadRaw() (int64, float64, float64, float64, float64, float64, float64, float64, float64, float64, error, error) {
|
||||
return m.mpu.Read()
|
||||
}
|
||||
|
||||
func (m *MPU9250) Close() {
|
||||
if m.quit != nil {
|
||||
m.quit <- struct{}{}
|
||||
|
|
Ładowanie…
Reference in New Issue