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:
- 70:9e7be21475f8
- Parent:
- 69:0caaad87cf1d
- Child:
- 71:62eb45ecffe9
--- a/global.hpp Mon Jun 28 03:30:54 2021 +0000 +++ b/global.hpp Tue Jun 29 10:53:06 2021 +0000 @@ -14,6 +14,7 @@ #include "UsaPack.hpp" #include "Vector3.hpp" #include "errStateEKF.hpp" +#include "MedianFilter.hpp" #define MPU6050_PWR_MGMT_1 0x6B #define MPU_ADDRESS 0x68 @@ -29,7 +30,7 @@ #define servoPwmMin 1200.0f #define motorPwmMax 2000.0f #define motorPwmMin 1100.0f -#define N_EEPROM 12 +#define N_EEPROM 18 // struct union union U @@ -105,6 +106,9 @@ extern Vector3 magref; extern Vector3 dynacc; extern Vector3 gyro; +extern MedianFilter accMedian; +extern MedianFilter gyroMedian; +extern MedianFilter magMedian; extern float scaledServoOut[1]; @@ -122,6 +126,8 @@ extern int agoffset[6]; extern float magbiasMin[3]; extern float magbiasMax[3]; +extern float accMin[3]; +extern float accMax[3]; extern Vector3 rpy_align; @@ -144,6 +150,7 @@ // setup.cpp extern void setup(); extern void calibrate(); +extern float accScaleCalibrate(int attNo); // run.cpp extern void run();