Fix formatting
This commit is contained in:
@@ -24,13 +24,7 @@
|
|||||||
#include "stdlib.h"
|
#include "stdlib.h"
|
||||||
#include "task.h"
|
#include "task.h"
|
||||||
|
|
||||||
enum class AccelType {
|
enum class AccelType { MMA = 1, LIS = 2, BMA = 3, MSA = 4, SC7 = 5, None = 99 };
|
||||||
MMA=1,
|
|
||||||
LIS=2,
|
|
||||||
BMA=3,
|
|
||||||
MSA=4,
|
|
||||||
SC7=5,
|
|
||||||
None=99 };
|
|
||||||
|
|
||||||
#define MOVFilter 8
|
#define MOVFilter 8
|
||||||
uint8_t accelInit = 0;
|
uint8_t accelInit = 0;
|
||||||
@@ -85,7 +79,7 @@ void detectAccelerometerVersion() {
|
|||||||
}
|
}
|
||||||
inline void readAccelerometer(int16_t &tx, int16_t &ty, int16_t &tz, Orientation &rotation) {
|
inline void readAccelerometer(int16_t &tx, int16_t &ty, int16_t &tz, Orientation &rotation) {
|
||||||
#ifdef ACCEL_MMA
|
#ifdef ACCEL_MMA
|
||||||
if (DetectedAccelerometerVersion == (int)AccelType::MMA) {
|
if (DetectedAccelerometerVersion == (int)AccelType::MMA) {
|
||||||
MMA8652FC::getAxisReadings(tx, ty, tz);
|
MMA8652FC::getAxisReadings(tx, ty, tz);
|
||||||
rotation = MMA8652FC::getOrientation();
|
rotation = MMA8652FC::getOrientation();
|
||||||
} else
|
} else
|
||||||
|
|||||||
Reference in New Issue
Block a user