Skip to content

Commit

Permalink
Updated LSM303DLHC magn tests to reflect the xzy ordering of the vari…
Browse files Browse the repository at this point in the history
…ables.
  • Loading branch information
srlm-io committed Dec 16, 2013
1 parent fd8cd39 commit 1f506b8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion libpropeller/lsm303dlhc/Makefile
12 changes: 6 additions & 6 deletions libpropeller/lsm303dlhc/lsm303dlhc.test.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ class UnityTests {
int x, y, z;
TEST_ASSERT_TRUE(acclMagn.ReadMagn(x, y, z));

TEST_ASSERT_EQUAL_HEX32(0x010, x);
TEST_ASSERT_EQUAL_HEX32(0x030, y);
TEST_ASSERT_EQUAL_HEX32(0x050, z);
TEST_ASSERT_EQUAL_HEX32(0x0102, x);
TEST_ASSERT_EQUAL_HEX32(0x0304, z);
TEST_ASSERT_EQUAL_HEX32(0x0506, y);
}

static void test_ReadMagnNegativeNumbers(void) {
Expand All @@ -77,9 +77,9 @@ class UnityTests {
int x, y, z;
TEST_ASSERT_TRUE(acclMagn.ReadMagn(x, y, z));

TEST_ASSERT_EQUAL_HEX32(0xFFFFFF1A, x);
TEST_ASSERT_EQUAL_HEX32(0xFFFFFF3A, y);
TEST_ASSERT_EQUAL_HEX32(0xFFFFFF5A, z);
TEST_ASSERT_EQUAL_HEX32(0xFFFFFF1A2, x);
TEST_ASSERT_EQUAL_HEX32(0xFFFFFF3A4, z);
TEST_ASSERT_EQUAL_HEX32(0xFFFFFF5A6, y);
}

//TODO(SRLM): Add tests for the ReadAccl/ReadMagn bus->Get == bus->kNak case
Expand Down
2 changes: 1 addition & 1 deletion libpropeller/lsm303dlhc/run_unit

0 comments on commit 1f506b8

Please sign in to comment.