Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed MatrixMath LPS25HB_I2C LSM9DS1 Matrix2 PIDcontroller LoopTicker SBUS_without_mainfile UsaPack solaESKF_wind Vector3 CalibrateMagneto FastPWM
Diff: global.hpp
- Revision:
- 77:b06a5f8554f4
- Parent:
- 73:be7a8b8188de
--- a/global.hpp Tue Sep 07 06:19:42 2021 +0000 +++ b/global.hpp Wed Sep 29 01:44:17 2021 +0000 @@ -5,8 +5,8 @@ #include "PIDcontroller.h" #include "SBUS.hpp" #include "LoopTicker.hpp" -#include "MPU6050.h" -#include "MAG3110.h" +//#include "MPU6050.h" +//#include "MAG3110.h" #include "CalibrateMagneto.h" #include "I2Cdev.h" #include "FastPWM.h" @@ -15,15 +15,16 @@ #include "Vector3.hpp" #include "ScErrStateEKF.hpp" #include "MedianFilter.hpp" +#include "LSM9DS1.h" #define MPU6050_PWR_MGMT_1 0x6B #define MPU_ADDRESS 0x68 #define M_PI 3.141592f -#define ACCEL_FSR MPU6050_ACCEL_FS_8 -#define ACCEL_SSF 4096.0f -#define GYRO_FSR MPU6050_GYRO_FS_250 -#define GYRO_SSF 131.0f -#define MPU6050_LPF MPU6050_DLPF_BW_256 +//#define ACCEL_FSR MPU6050_ACCEL_FS_8 +#define ACCEL_SSF 1/(0.244f*0.001f) +//#define GYRO_FSR MPU6050_GYRO_FS_250 +#define GYRO_SSF 1/(8.75f*0.001f) +//#define MPU6050_LPF MPU6050_DLPF_BW_256 #define gyro_th 20.0f #define PID_dt 0.015f #define servoPwmMax 1800.0f @@ -71,8 +72,9 @@ extern SBUS sbus; // sensor -extern MPU6050 accelgyro; -extern MAG3110 mag_sensor; +//extern MPU6050 accelgyro; +//extern MAG3110 mag_sensor; +extern LSM9DS1 lsm; //PmodNAV extern CalibrateMagneto magCalibrator; // io @@ -93,7 +95,7 @@ extern int16_t ax, ay, az; extern int16_t gx, gy, gz; -extern MotionSensorDataUnits mdata; +//extern MotionSensorDataUnits mdata; extern float magval[3]; // elevator