All modules and core of the app was created
This commit is contained in:
@@ -10,23 +10,28 @@ struct MpuData {
|
||||
float ax, ay, az;
|
||||
float gx, gy, gz;
|
||||
float yaw, pitch, roll;
|
||||
float gravityZ;
|
||||
float gravity;
|
||||
float zInertial;
|
||||
};
|
||||
|
||||
class Sensors {
|
||||
public:
|
||||
Sensors(Barometer &barometer, MPU &mpu, Kalman2DFilter &filter, BatteryController &battery, bool loop_on_fail = true);
|
||||
Sensors(Barometer *barometer, MPU *mpu, Kalman2DFilter *filter, BatteryController *battery, bool loop_on_fail = true);
|
||||
|
||||
~Sensors();
|
||||
|
||||
void measureBaseAltitudeSync(void);
|
||||
void measureBaseAltitudeAsync(void);
|
||||
float rawFlightHeight(void);
|
||||
float flightHeight(void);
|
||||
void onMeasuaringAltitudeFinished(OnMeasuringFinishedCb callback);
|
||||
float rawFlightHeight(void) const;
|
||||
float flightHeight(void) const;
|
||||
|
||||
MpuData mpuData(void);
|
||||
void startMpuCalibration();
|
||||
void onMpuCalibrationFinished(OnCalibrationFinishedCb callback);
|
||||
|
||||
int batteryCharge(void); // [%]
|
||||
MpuData mpuData(void) const;
|
||||
|
||||
int batteryCharge(void) const; // [%]
|
||||
|
||||
bool tick(void);
|
||||
|
||||
@@ -39,7 +44,7 @@ class Sensors {
|
||||
/* cached filtered values */
|
||||
float _flightHeightFromBarometer = NAN;
|
||||
float _zVelocityAltitude = NAN;
|
||||
MpuData _mpuData = { NAN, NAN, NAN, NAN, NAN, NAN, NAN, NAN, NAN, NAN };
|
||||
MpuData _mpuData = { NAN, NAN, NAN, NAN, NAN, NAN, NAN, NAN, NAN, NAN, NAN };
|
||||
|
||||
|
||||
static constexpr const char *_tag = "Sensors";
|
||||
|
||||
Reference in New Issue
Block a user