From c7cc47ae306b8012c196587f156519b0773aef93 Mon Sep 17 00:00:00 2001 From: Jean-François Milants Date: Thu, 1 Apr 2021 21:18:59 +0200 Subject: 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). --- src/systemtask/SystemTask.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/systemtask') 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)) { -- cgit v1.2.3