Skip to content

Added compatibility with other Arduino IMU libraries #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Arduino_LSM6DS3.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef _ARUDINO_LSM6DS3_H_
#define _ARUDINO_LSM6DS3_H_
#ifndef _ARDUINO_LSM6DS3_H_
#define _ARDUINO_LSM6DS3_H_

#include "LSM6DS3.h"

Expand Down
6 changes: 3 additions & 3 deletions src/LSM6DS3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ int LSM6DS3Class::writeRegister(uint8_t address, uint8_t value)
}

#ifdef ARDUINO_AVR_UNO_WIFI_REV2
LSM6DS3Class IMU(SPI, SPIIMU_SS, SPIIMU_INT);
LSM6DS3Class IMU(SPI, SPIIMU_SS, SPIIMU_INT);
#else
LSM6DS3Class IMU(Wire, LSM6DS3_ADDRESS);
#endif
LSM6DS3Class IMU_LSM6DS3(Wire, LSM6DS3_ADDRESS);
#endif
4 changes: 3 additions & 1 deletion src/LSM6DS3.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,6 @@ class LSM6DS3Class {
SPISettings _spiSettings;
};

extern LSM6DS3Class IMU;
extern LSM6DS3Class IMU_LSM6DS3;
#undef IMU
#define IMU IMU_LSM6DS3