1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-20 06:45:14 +03:00

debug for stage2 filter

This commit is contained in:
Pawel Spychalski (DzikuVx) 2018-05-10 22:03:12 +02:00
parent 2d0f76e7e2
commit 78396808aa
3 changed files with 10 additions and 1 deletions

View file

@ -57,6 +57,7 @@ typedef enum {
DEBUG_SBUS,
DEBUG_FPORT,
DEBUG_ALWAYS,
DEBUG_STAGE2,
DEBUG_COUNT
} debugType_e;

View file

@ -69,7 +69,7 @@ tables:
- name: i2c_speed
values: ["400KHZ", "800KHZ", "100KHZ", "200KHZ"]
- name: debug_modes
values: ["NONE", "GYRO", "NOTCH", "NAV_LANDING", "FW_ALTITUDE", "AGL", "FLOW_RAW", "SBUS", "FPORT", "ALWAYS"]
values: ["NONE", "GYRO", "NOTCH", "NAV_LANDING", "FW_ALTITUDE", "AGL", "FLOW_RAW", "SBUS", "FPORT", "ALWAYS", "STAGE2"]
- name: async_mode
values: ["NONE", "GYRO", "ALL"]
- name: aux_operator

View file

@ -441,10 +441,18 @@ void gyroUpdate(timeDelta_t gyroUpdateDeltaUs)
DEBUG_SET(DEBUG_GYRO, axis, lrintf(gyroADCf));
if (axis < 2) {
DEBUG_SET(DEBUG_STAGE2, axis, lrintf(gyroADCf));
}
#ifdef USE_GYRO_BIQUAD_RC_FIR2
gyroADCf = gyroFilterStage2ApplyFn(stage2Filter[axis], gyroADCf);
#endif
if (axis < 2) {
DEBUG_SET(DEBUG_STAGE2, axis + 2, lrintf(gyroADCf));
}
gyroADCf = softLpfFilterApplyFn(softLpfFilter[axis], gyroADCf);
DEBUG_SET(DEBUG_NOTCH, axis, lrintf(gyroADCf));