From 6d5f6a8b5f559ba0f5deb6fd9eef2b6081033b40 Mon Sep 17 00:00:00 2001 From: Carlo PARATA Date: Wed, 11 Oct 2023 09:02:28 +0200 Subject: [PATCH] Fix issue in 6D Orientation example --- .../LSM6DSV16X_6D_Orientation.ino | 10 +++++----- library.properties | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/LSM6DSV16X_6D_Orientation/LSM6DSV16X_6D_Orientation.ino b/examples/LSM6DSV16X_6D_Orientation/LSM6DSV16X_6D_Orientation.ino index bbe2ddb..9e4b193 100644 --- a/examples/LSM6DSV16X_6D_Orientation/LSM6DSV16X_6D_Orientation.ino +++ b/examples/LSM6DSV16X_6D_Orientation/LSM6DSV16X_6D_Orientation.ino @@ -88,7 +88,7 @@ void sendOrientation() LSM6DSV16X.Get_6D_Orientation_ZL(&zl); LSM6DSV16X.Get_6D_Orientation_ZH(&zh); - if (xl == 1 && yl == 0 && zl == 0 && xh == 0 && yh == 0 && zh == 0) { + if (xl == 0 && yl == 0 && zl == 0 && xh == 0 && yh == 1 && zh == 0) { sprintf(report, "\r\n ________________ " \ "\r\n | | " \ "\r\n | * | " \ @@ -99,7 +99,7 @@ void sendOrientation() "\r\n |________________| \r\n"); } - else if (xl == 0 && yl == 1 && zl == 0 && xh == 0 && yh == 0 && zh == 0) { + else if (xl == 1 && yl == 0 && zl == 0 && xh == 0 && yh == 0 && zh == 0) { sprintf(report, "\r\n ________________ " \ "\r\n | | " \ "\r\n | * | " \ @@ -110,7 +110,7 @@ void sendOrientation() "\r\n |________________| \r\n"); } - else if (xl == 0 && yl == 0 && zl == 0 && xh == 0 && yh == 1 && zh == 0) { + else if (xl == 0 && yl == 0 && zl == 0 && xh == 1 && yh == 0 && zh == 0) { sprintf(report, "\r\n ________________ " \ "\r\n | | " \ "\r\n | | " \ @@ -121,7 +121,7 @@ void sendOrientation() "\r\n |________________| \r\n"); } - else if (xl == 0 && yl == 0 && zl == 0 && xh == 1 && yh == 0 && zh == 0) { + else if (xl == 0 && yl == 1 && zl == 0 && xh == 0 && yh == 0 && zh == 0) { sprintf(report, "\r\n ________________ " \ "\r\n | | " \ "\r\n | | " \ @@ -144,7 +144,7 @@ void sendOrientation() } else { - sprintf(report, "None of the 6D orientation axes is set in accelrometer.\r\n"); + sprintf(report, "None of the 6D orientation axes is set in accelerometer.\r\n"); } Serial.print(report); diff --git a/library.properties b/library.properties index 8535cd8..5bee5c1 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=STM32duino LSM6DSV16X -version=1.7.2 +version=1.7.3 author=SRA maintainer=stm32duino sentence=Ultra Low Power inertial measurement unit.