1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 12:55:19 +03:00

Changed gyro init and read functions to take a gyro_t* parameter.

Scaled gyro values to degrees per second in gyroUpdate.
This commit is contained in:
Martin Budden 2016-11-19 14:11:03 +00:00
parent 55b32740d9
commit 590e569375
28 changed files with 136 additions and 124 deletions

View file

@ -18,6 +18,7 @@
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <math.h>
#include "platform.h"
@ -495,7 +496,7 @@ void showSensorsPage(void)
}
if (sensors(SENSOR_GYRO)) {
tfp_sprintf(lineBuffer, format, "GYR", gyroADC[X], gyroADC[Y], gyroADC[Z]);
tfp_sprintf(lineBuffer, format, "GYR", lrintf(gyroADCf[X]), lrintf(gyroADCf[Y]), lrintf(gyroADCf[Z]));
padLineBuffer();
i2c_OLED_set_line(rowIndex++);
i2c_OLED_send_string(lineBuffer);