VGR
Dependents: VITI_motor_angle_1 VITI_motor_angle_2 VITI_motor_angle_3
Revision 9:33258ebdb817, committed 2020-05-21
- Comitter:
- gr66
- Date:
- Thu May 21 17:42:32 2020 +0000
- Parent:
- 8:16e88babd42a
- Commit message:
- V1
Changed in this revision
LSM9DS1.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 16e88babd42a -r 33258ebdb817 LSM9DS1.cpp --- a/LSM9DS1.cpp Mon Jun 19 02:25:48 2017 +0000 +++ b/LSM9DS1.cpp Thu May 21 17:42:32 2020 +0000 @@ -89,7 +89,7 @@ char cmd[4] = { CTRL_REG1_G, - gScale | G_ODR_119_BW_14, + (char)(gScale | G_ODR_119_BW_14), 0x03, // Data pass througn HPF and LPF2, default int out 0x80 // Low-power mode, disable high-pass filter, default cut-off frequency }; @@ -103,7 +103,8 @@ char cmd[4] = { CTRL_REG5_XL, 0x38, // Enable all axis and don't decimate data in out Registers - (A_ODR_119 << 5) | (aScale << 3) | (A_BW_AUTO_SCALE), // 119 Hz ODR, set scale, and auto BW + //gr + (char)((A_ODR_119 << 5) | (aScale << 3) | (A_BW_AUTO_SCALE)), // 119 Hz ODR, set scale, and auto BW 0 // Default resolution mode and filtering settings }; @@ -116,7 +117,8 @@ char cmd[4] = { CTRL_REG1_M, 0x10, // Default data rate, xy axes mode, and temp comp - mScale << 5, // Set mag scale + // gr + (char)(mScale << 5), // Set mag scale 0 // Enable I2C, write only SPI, not LP mode, Continuous conversion mode };