Speed up accelerometer data intake.
The LIS2DH12 driver performed an unnecessary endianness conversion, as data from the sensor was already coming in little-endian format. The MMA8652FC driver is now using the rev16 opcode to perform the swap rather than doing all the bitshuffling operations in multiple steps.
This commit is contained in:
@@ -254,10 +254,10 @@ void startMOVTask(void const *argument __unused) {
|
||||
threshold -= systemSettings.sensitivity * 200; // 200 is the step size
|
||||
|
||||
if (PCBVersion == 2) {
|
||||
LIS2DH12::getAxisReadings(&tx, &ty, &tz);
|
||||
LIS2DH12::getAxisReadings(tx, ty, tz);
|
||||
rotation = LIS2DH12::getOrientation();
|
||||
} else if (PCBVersion == 1) {
|
||||
MMA8652FC::getAxisReadings(&tx, &ty, &tz);
|
||||
MMA8652FC::getAxisReadings(tx, ty, tz);
|
||||
rotation = MMA8652FC::getOrientation();
|
||||
}
|
||||
if (systemSettings.OrientationMode == 2) {
|
||||
|
||||
Reference in New Issue
Block a user