Kionix KX123 accelerometer C++ driver. Can be used for some extend also with kx022, kx023, kx122, etc. when used features are present in sensor.
Fork of kionix-kx123-driver by
Revision 4:749ec3447c5f, committed 2018-02-03
- Comitter:
- MACRUM
- Date:
- Sat Feb 03 14:26:17 2018 +0000
- Parent:
- 3:4fd5361ed180
- Commit message:
- Fix for KX224
Changed in this revision
kx123.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 4fd5361ed180 -r 749ec3447c5f kx123.cpp --- a/kx123.cpp Thu Oct 06 13:02:55 2016 +0000 +++ b/kx123.cpp Sat Feb 03 14:26:17 2018 +0000 @@ -111,7 +111,7 @@ //ODCNTL: Output Data Rate control (ODR) i2c_rw.write_register(_sad, KX122_ODCNTL, KX122_ODCNTL_OSA_25600); //Setup G-range and 8/16-bit resolution + set CNTL1 PC1-bit to operating mode (also WUF_EN, TP_EN and DT_EN) - i2c_rw.write_register(_sad, KX122_CNTL1, ( KX122_CNTL1_PC1 | KX122_CNTL1_GSEL_8G | KX122_CNTL1_RES ) ); + i2c_rw.write_register(_sad, KX122_CNTL1, ( KX122_CNTL1_PC1 /*| KX122_CNTL1_GSEL_8G*/ | KX122_CNTL1_RES ) ); setup_mode_on = false; //resolution_divider = 32768/2; //KX122_CNTL1_GSEL_2G