1
0
Fork 0
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:
Martin Budden 2017-08-28 08:21:55 +01:00
parent ee48272462
commit ee1e008a80
3 changed files with 4 additions and 1 deletions

View file

@ -50,5 +50,6 @@ const char * const debugModeNames[DEBUG_COUNT] = {
"FFT",
"FFT_TIME",
"FFT_FREQ",
"FRSKY_D_RX"
"FRSKY_D_RX",
"GYRO_RAW"
};

View file

@ -69,6 +69,7 @@ typedef enum {
DEBUG_FFT_TIME,
DEBUG_FFT_FREQ,
DEBUG_FRSKY_D_RX,
DEBUG_GYRO_RAW,
DEBUG_COUNT
} debugType_e;

View file

@ -575,6 +575,7 @@ void gyroUpdateSensor(gyroSensor_t *gyroSensor)
#endif
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
float gyroADCf = (float)gyroSensor->gyroDev.gyroADC[axis] * gyroSensor->gyroDev.scale;
// DEBUG_GYRO_NOTCH records the unfiltered gyro output