Link into MOV thread
This commit is contained in:
@@ -23,6 +23,7 @@
|
|||||||
#define ENABLE_QC2
|
#define ENABLE_QC2
|
||||||
#define TEMP_TMP36
|
#define TEMP_TMP36
|
||||||
#define ACCEL_BMA
|
#define ACCEL_BMA
|
||||||
|
#define ACCEL_SC7
|
||||||
#define HALL_SENSOR
|
#define HALL_SENSOR
|
||||||
#define HALL_SI7210
|
#define HALL_SI7210
|
||||||
#define BATTFILTERDEPTH 32
|
#define BATTFILTERDEPTH 32
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
#include "power.hpp"
|
#include "power.hpp"
|
||||||
#include "stdlib.h"
|
#include "stdlib.h"
|
||||||
#include "task.h"
|
#include "task.h"
|
||||||
|
#include "SC7A20.hpp"
|
||||||
#define MOVFilter 8
|
#define MOVFilter 8
|
||||||
uint8_t accelInit = 0;
|
uint8_t accelInit = 0;
|
||||||
TickType_t lastMovementTime = 0;
|
TickType_t lastMovementTime = 0;
|
||||||
@@ -56,6 +57,14 @@ void detectAccelerometerVersion() {
|
|||||||
DetectedAccelerometerVersion = 4;
|
DetectedAccelerometerVersion = 4;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
|
#endif
|
||||||
|
#ifdef ACCEL_SC7
|
||||||
|
if (SC7A20::detect()) {
|
||||||
|
// Setup the SC7A20 Accelerometer
|
||||||
|
if (SC7A20::initalize()) {
|
||||||
|
DetectedAccelerometerVersion = 5;
|
||||||
|
}
|
||||||
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
// disable imu sensitivity
|
// disable imu sensitivity
|
||||||
@@ -86,6 +95,12 @@ inline void readAccelerometer(int16_t &tx, int16_t &ty, int16_t &tz, Orientation
|
|||||||
MSA301::getAxisReadings(tx, ty, tz);
|
MSA301::getAxisReadings(tx, ty, tz);
|
||||||
rotation = MSA301::getOrientation();
|
rotation = MSA301::getOrientation();
|
||||||
} else
|
} else
|
||||||
|
#endif
|
||||||
|
#ifdef ACCEL_SC7
|
||||||
|
if (DetectedAccelerometerVersion == 5) {
|
||||||
|
SC7A20::getAxisReadings(tx, ty, tz);
|
||||||
|
rotation = SC7A20::getOrientation();
|
||||||
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
// do nothing :(
|
// do nothing :(
|
||||||
|
|||||||
Reference in New Issue
Block a user