summaryrefslogtreecommitdiff
path: root/src/systemtask
diff options
context:
space:
mode:
authorJean-François Milants <jf@codingfield.com>2021-04-01 21:18:59 +0200
committerJean-François Milants <jf@codingfield.com>2021-04-04 15:56:11 +0200
commitc7cc47ae306b8012c196587f156519b0773aef93 (patch)
tree72df182a16b1636a72009275119dff6f3494d258 /src/systemtask
parent19b53545d42f343668a340f24616f153866051a1 (diff)
Code cleaning in BMA421 driver. Do the axis inversion in the driver and not in the application.
NOTE: Axis remapping from the SDK do not apply to the "raw" X/Y/Z values returned to the sensor. According to the doc, the remapping is only applied to features, but I cannot check if it has any effect on step counting (I'm not sure I use it correctly, doc is not complete enough about this feature).
Diffstat (limited to 'src/systemtask')
-rw-r--r--src/systemtask/SystemTask.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp
index bf1839c7..74c2c46e 100644
--- a/src/systemtask/SystemTask.cpp
+++ b/src/systemtask/SystemTask.cpp
@@ -243,8 +243,8 @@ void SystemTask::UpdateMotion() {
if(isSleeping)
twiMaster.Sleep();
- motionController.Update(motionValues.y,
- motionValues.x,
+ motionController.Update(motionValues.x,
+ motionValues.y,
motionValues.z,
motionValues.steps);
if (motionController.ShouldWakeUp(isSleeping)) {