Skip to content

Commit

Permalink
L3G: updated library to get it to work with L3GD20H
Browse files Browse the repository at this point in the history
  • Loading branch information
jtf006 authored and kevin-pololu committed Feb 5, 2014
1 parent b0970e5 commit 35f462e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions L3G/L3G.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ bool L3G::autoDetectAddress(void)
address = L3G4200D_ADDRESS_SA0_HIGH;
if (readReg(L3G_WHO_AM_I) == 0xD3) return true;
address = L3GD20_ADDRESS_SA0_LOW;
if (readReg(L3G_WHO_AM_I) == 0xD4) return true;
if (readReg(L3G_WHO_AM_I) == 0xD4 || readReg(L3G_WHO_AM_I) == 0xD7) return true;
address = L3GD20_ADDRESS_SA0_HIGH;
if (readReg(L3G_WHO_AM_I) == 0xD4) return true;
if (readReg(L3G_WHO_AM_I) == 0xD4 || readReg(L3G_WHO_AM_I) == 0xD7) return true;

return false;
}
2 changes: 2 additions & 0 deletions L3G/L3G.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
#define L3G_INT1_THS_ZH 0x36
#define L3G_INT1_THS_ZL 0x37
#define L3G_INT1_DURATION 0x38
#define L3G_LOW_ODR 0x39


class L3G
{
Expand Down

0 comments on commit 35f462e

Please sign in to comment.