Skip to content

Commit

Permalink
Fix issue in 6D Orientation example
Browse files Browse the repository at this point in the history
  • Loading branch information
cparata committed Oct 11, 2023
1 parent 88f41ac commit 6d5f6a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions examples/LSM6DSV16X_6D_Orientation/LSM6DSV16X_6D_Orientation.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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 | * | " \
Expand All @@ -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 | * | " \
Expand All @@ -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 | | " \
Expand All @@ -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 | | " \
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -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.
Expand Down

0 comments on commit 6d5f6a8

Please sign in to comment.