mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 14:25:20 +03:00
Added #define for imu debug output (+16 squashed commit)
Squashed local commits: from : e4265d4a13f63f82d5cf55eea2c091622f96660b up to (inc): 72416dc74745fa8bae1aded79aa4b9ed0e389076
This commit is contained in:
parent
c6f5b98a79
commit
45a4f11f92
21 changed files with 823 additions and 188 deletions
|
@ -18,13 +18,13 @@
|
|||
#pragma once
|
||||
|
||||
extern int16_t throttleAngleCorrection;
|
||||
extern uint32_t accTimeSum;
|
||||
extern int accSumCount;
|
||||
extern float accVelScale;
|
||||
extern t_fp_vector EstG;
|
||||
extern int16_t accSmooth[XYZ_AXIS_COUNT];
|
||||
extern int32_t accSum[XYZ_AXIS_COUNT];
|
||||
extern int16_t smallAngle;
|
||||
extern uint32_t accTimeSum; // altitudehold.c
|
||||
extern int accSumCount; // altitudehold.c
|
||||
extern float accVelScale; // altitudehold.c
|
||||
extern t_fp_vector EstG; // display.c
|
||||
extern int16_t accSmooth[XYZ_AXIS_COUNT]; // blackbox.c, display.c, serial_msp.c, frsky.c, smartport.c
|
||||
extern int32_t accSum[XYZ_AXIS_COUNT]; // altitudehold.c
|
||||
extern int16_t smallAngle; // display.c
|
||||
|
||||
typedef struct rollAndPitchInclination_s {
|
||||
// absolute angle inclination in multiple of 0.1 degree 180 deg = 1800
|
||||
|
@ -52,6 +52,22 @@ typedef struct imuRuntimeConfig_s {
|
|||
uint8_t small_angle;
|
||||
} imuRuntimeConfig_t;
|
||||
|
||||
typedef enum {
|
||||
ACCPROC_READ = 0,
|
||||
ACCPROC_CHUNK_1,
|
||||
ACCPROC_CHUNK_2,
|
||||
ACCPROC_CHUNK_3,
|
||||
ACCPROC_CHUNK_4,
|
||||
ACCPROC_CHUNK_5,
|
||||
ACCPROC_CHUNK_6,
|
||||
ACCPROC_CHUNK_7,
|
||||
ACCPROC_COPY
|
||||
} accProcessorState_e;
|
||||
|
||||
typedef struct accProcessor_s {
|
||||
accProcessorState_e state;
|
||||
} accProcessor_t;
|
||||
|
||||
void imuConfigure(
|
||||
imuRuntimeConfig_t *initialImuRuntimeConfig,
|
||||
pidProfile_t *initialPidProfile,
|
||||
|
@ -61,7 +77,6 @@ void imuConfigure(
|
|||
);
|
||||
|
||||
void calculateEstimatedAltitude(uint32_t currentTime);
|
||||
void imuUpdate(rollAndPitchTrims_t *accelerometerTrims);
|
||||
float calculateThrottleAngleScale(uint16_t throttle_correction_angle);
|
||||
int16_t calculateThrottleAngleCorrection(uint8_t throttle_correction_value);
|
||||
float calculateAccZLowPassFilterRCTimeConstant(float accz_lpf_cutoff);
|
||||
|
@ -69,5 +84,4 @@ float calculateAccZLowPassFilterRCTimeConstant(float accz_lpf_cutoff);
|
|||
int16_t imuCalculateHeading(t_fp_vector *vec);
|
||||
|
||||
void imuResetAccelerationSum(void);
|
||||
|
||||
|
||||
void imuUpdate(rollAndPitchTrims_t *accelerometerTrims, uint8_t acc_for_fast_looptime);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue