Fix rawdata z axis

This commit is contained in:
PaulStoffregen 2018-01-22 16:10:39 -08:00
commit f8f279563f
2 changed files with 4 additions and 4 deletions

View file

@ -15,8 +15,8 @@
#if defined(LINUX)
#include <termios.h>
#include <unistd.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/gl.h> // sudo apt install mesa-common-dev
#include <GL/glu.h> // sudo apt install libglu1-mesa-dev freeglut3-dev
#elif defined(WINDOWS)
#include <windows.h>
#include <GL/gl.h>

View file

@ -186,10 +186,10 @@ void raw_data(const int16_t *data)
z = (float)data[2] * G_PER_COUNT;
accel.GpFast[0] = x;
accel.GpFast[1] = y;
accel.GpFast[2] = y;
accel.GpFast[2] = z;
accel.Gp[0] += x;
accel.Gp[1] += y;
accel.Gp[2] += y;
accel.Gp[2] += z;
x = (float)data[3] * DEG_PER_SEC_PER_COUNT;
y = (float)data[4] * DEG_PER_SEC_PER_COUNT;