summaryrefslogtreecommitdiff
path: root/megalogger
diff options
context:
space:
mode:
Diffstat (limited to 'megalogger')
-rw-r--r--megalogger/config.h1
-rw-r--r--megalogger/megalogger.ino6
2 files changed, 6 insertions, 1 deletions
diff --git a/megalogger/config.h b/megalogger/config.h
index 24b456f..9a4d8c1 100644
--- a/megalogger/config.h
+++ b/megalogger/config.h
@@ -53,6 +53,7 @@
//#define USE_MPU9150 1
#define ACC_DATA_RATIO 160
#define GYRO_DATA_RATIO 256
+#define COMPASS_DATA_RATIO 8
/**************************************
* Timeout/interval options
diff --git a/megalogger/megalogger.ino b/megalogger/megalogger.ino
index 22ba948..6def771 100644
--- a/megalogger/megalogger.ino
+++ b/megalogger/megalogger.ino
@@ -475,7 +475,11 @@ void processAccelerometer()
gx /= GYRO_DATA_RATIO;
gy /= GYRO_DATA_RATIO;
gz /= GYRO_DATA_RATIO;
-
+#if USE_MPU9150
+ mx /= COMPASS_DATA_RATIO;
+ my /= COMPASS_DATA_RATIO;
+ mz /= COMPASS_DATA_RATIO;
+#endif
// display MEMS data
lcd.setFontSize(FONT_SIZE_SMALL);
lcd.setCursor(214, 22);