mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 13:25:30 +03:00
Added gyro raw output debug mode
This commit is contained in:
parent
ee48272462
commit
ee1e008a80
3 changed files with 4 additions and 1 deletions
|
@ -50,5 +50,6 @@ const char * const debugModeNames[DEBUG_COUNT] = {
|
||||||
"FFT",
|
"FFT",
|
||||||
"FFT_TIME",
|
"FFT_TIME",
|
||||||
"FFT_FREQ",
|
"FFT_FREQ",
|
||||||
"FRSKY_D_RX"
|
"FRSKY_D_RX",
|
||||||
|
"GYRO_RAW"
|
||||||
};
|
};
|
||||||
|
|
|
@ -69,6 +69,7 @@ typedef enum {
|
||||||
DEBUG_FFT_TIME,
|
DEBUG_FFT_TIME,
|
||||||
DEBUG_FFT_FREQ,
|
DEBUG_FFT_FREQ,
|
||||||
DEBUG_FRSKY_D_RX,
|
DEBUG_FRSKY_D_RX,
|
||||||
|
DEBUG_GYRO_RAW,
|
||||||
DEBUG_COUNT
|
DEBUG_COUNT
|
||||||
} debugType_e;
|
} debugType_e;
|
||||||
|
|
||||||
|
|
|
@ -575,6 +575,7 @@ void gyroUpdateSensor(gyroSensor_t *gyroSensor)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (int axis = 0; axis < XYZ_AXIS_COUNT; axis++) {
|
for (int axis = 0; axis < XYZ_AXIS_COUNT; axis++) {
|
||||||
|
DEBUG_SET(DEBUG_GYRO_RAW, axis, gyroSensor->gyroDev.gyroADCRaw[axis]);
|
||||||
// scale gyro output to degrees per second
|
// scale gyro output to degrees per second
|
||||||
float gyroADCf = (float)gyroSensor->gyroDev.gyroADC[axis] * gyroSensor->gyroDev.scale;
|
float gyroADCf = (float)gyroSensor->gyroDev.gyroADC[axis] * gyroSensor->gyroDev.scale;
|
||||||
// DEBUG_GYRO_NOTCH records the unfiltered gyro output
|
// DEBUG_GYRO_NOTCH records the unfiltered gyro output
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue