mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-20 14:55:18 +03:00
debug for stage2 filter
This commit is contained in:
parent
2d0f76e7e2
commit
78396808aa
3 changed files with 10 additions and 1 deletions
|
@ -57,6 +57,7 @@ typedef enum {
|
||||||
DEBUG_SBUS,
|
DEBUG_SBUS,
|
||||||
DEBUG_FPORT,
|
DEBUG_FPORT,
|
||||||
DEBUG_ALWAYS,
|
DEBUG_ALWAYS,
|
||||||
|
DEBUG_STAGE2,
|
||||||
DEBUG_COUNT
|
DEBUG_COUNT
|
||||||
} debugType_e;
|
} debugType_e;
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@ tables:
|
||||||
- name: i2c_speed
|
- name: i2c_speed
|
||||||
values: ["400KHZ", "800KHZ", "100KHZ", "200KHZ"]
|
values: ["400KHZ", "800KHZ", "100KHZ", "200KHZ"]
|
||||||
- name: debug_modes
|
- 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
|
- name: async_mode
|
||||||
values: ["NONE", "GYRO", "ALL"]
|
values: ["NONE", "GYRO", "ALL"]
|
||||||
- name: aux_operator
|
- name: aux_operator
|
||||||
|
|
|
@ -441,10 +441,18 @@ void gyroUpdate(timeDelta_t gyroUpdateDeltaUs)
|
||||||
|
|
||||||
DEBUG_SET(DEBUG_GYRO, axis, lrintf(gyroADCf));
|
DEBUG_SET(DEBUG_GYRO, axis, lrintf(gyroADCf));
|
||||||
|
|
||||||
|
if (axis < 2) {
|
||||||
|
DEBUG_SET(DEBUG_STAGE2, axis, lrintf(gyroADCf));
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef USE_GYRO_BIQUAD_RC_FIR2
|
#ifdef USE_GYRO_BIQUAD_RC_FIR2
|
||||||
gyroADCf = gyroFilterStage2ApplyFn(stage2Filter[axis], gyroADCf);
|
gyroADCf = gyroFilterStage2ApplyFn(stage2Filter[axis], gyroADCf);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (axis < 2) {
|
||||||
|
DEBUG_SET(DEBUG_STAGE2, axis + 2, lrintf(gyroADCf));
|
||||||
|
}
|
||||||
|
|
||||||
gyroADCf = softLpfFilterApplyFn(softLpfFilter[axis], gyroADCf);
|
gyroADCf = softLpfFilterApplyFn(softLpfFilter[axis], gyroADCf);
|
||||||
|
|
||||||
DEBUG_SET(DEBUG_NOTCH, axis, lrintf(gyroADCf));
|
DEBUG_SET(DEBUG_NOTCH, axis, lrintf(gyroADCf));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue