1
0
forked from me/IronOS

Re enable accel, fix accel flags & cleanup qc

This commit is contained in:
Ben V. Brown
2020-07-29 22:53:08 +10:00
parent a39185315d
commit 9391158399
5 changed files with 128 additions and 114 deletions

View File

@@ -25,7 +25,6 @@ uint32_t lastMovementTime = 0;
void startMOVTask(void const *argument __unused) {
OLED::setRotation(systemSettings.OrientationMode & 1);
postRToSInit();
power_probe();
lastMovementTime = 0;
int16_t datax[MOVFilter] = { 0 };
int16_t datay[MOVFilter] = { 0 };
@@ -39,13 +38,20 @@ void startMOVTask(void const *argument __unused) {
for (;;) {
int32_t threshold = 1500 + (9 * 200);
threshold -= systemSettings.sensitivity * 200; // 200 is the step size
#ifdef ACCEL_LIS
if (PCBVersion == 2) {
LIS2DH12::getAxisReadings(tx, ty, tz);
rotation = LIS2DH12::getOrientation();
} else if (PCBVersion == 1) {
} else
#endif
#ifdef ACCEL_MMA
if (PCBVersion == 1) {
MMA8652FC::getAxisReadings(tx, ty, tz);
rotation = MMA8652FC::getOrientation();
}else
#endif
{
//do nothing :(
}
if (systemSettings.OrientationMode == 2) {
if (rotation != ORIENTATION_FLAT) {