From 46a62bc4f563fd882cf32825db31b2717029e668 Mon Sep 17 00:00:00 2001 From: discip <53649486+discip@users.noreply.github.com> Date: Sat, 25 Sep 2021 00:55:45 +0200 Subject: [PATCH] Update MOVThread.cpp --- source/Core/Threads/MOVThread.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/source/Core/Threads/MOVThread.cpp b/source/Core/Threads/MOVThread.cpp index 791f9169..5496ff10 100644 --- a/source/Core/Threads/MOVThread.cpp +++ b/source/Core/Threads/MOVThread.cpp @@ -33,7 +33,7 @@ void detectAccelerometerVersion() { #ifdef ACCEL_MMA if (MMA8652FC::detect()) { if (MMA8652FC::initalize()) { - DetectedAccelerometerVersion = "MMA"; + DetectedAccelerometerVersion = MMA; } } else #endif @@ -41,7 +41,7 @@ void detectAccelerometerVersion() { if (LIS2DH12::detect()) { // Setup the ST Accelerometer if (LIS2DH12::initalize()) { - DetectedAccelerometerVersion = "LIS"; + DetectedAccelerometerVersion = LIS; } } else #endif @@ -49,7 +49,7 @@ void detectAccelerometerVersion() { if (BMA223::detect()) { // Setup the BMA223 Accelerometer if (BMA223::initalize()) { - DetectedAccelerometerVersion = "BMA"; + DetectedAccelerometerVersion = BMA; } } else #endif @@ -57,7 +57,7 @@ void detectAccelerometerVersion() { if (MSA301::detect()) { // Setup the MSA301 Accelerometer if (MSA301::initalize()) { - DetectedAccelerometerVersion = "MSA"; + DetectedAccelerometerVersion = MSA; } } else #endif @@ -65,7 +65,7 @@ void detectAccelerometerVersion() { if (SC7A20::detect()) { // Setup the SC7A20 Accelerometer if (SC7A20::initalize()) { - DetectedAccelerometerVersion = "SC7"; + DetectedAccelerometerVersion = SC7; } } else #endif @@ -77,31 +77,31 @@ void detectAccelerometerVersion() { } inline void readAccelerometer(int16_t &tx, int16_t &ty, int16_t &tz, Orientation &rotation) { #ifdef ACCEL_MMA - if (DetectedAccelerometerVersion == "MMA") { + if (DetectedAccelerometerVersion == MMA) { MMA8652FC::getAxisReadings(tx, ty, tz); rotation = MMA8652FC::getOrientation(); } else #endif #ifdef ACCEL_LIS - if (DetectedAccelerometerVersion == "LIS") { + if (DetectedAccelerometerVersion == LIS) { LIS2DH12::getAxisReadings(tx, ty, tz); rotation = LIS2DH12::getOrientation(); } else #endif #ifdef ACCEL_BMA - if (DetectedAccelerometerVersion == "BMA") { + if (DetectedAccelerometerVersion == BMA) { BMA223::getAxisReadings(tx, ty, tz); rotation = BMA223::getOrientation(); } else #endif #ifdef ACCEL_MSA - if (DetectedAccelerometerVersion == "MSA") { + if (DetectedAccelerometerVersion == MSA) { MSA301::getAxisReadings(tx, ty, tz); rotation = MSA301::getOrientation(); } else #endif #ifdef ACCEL_SC7 - if (DetectedAccelerometerVersion == "SC7") { + if (DetectedAccelerometerVersion == SC7) { SC7A20::getAxisReadings(tx, ty, tz); rotation = SC7A20::getOrientation(); } else