Ultra low-power, high performance 3-axis magnetometer.
Dependencies: ST_INTERFACES X_NUCLEO_COMMON
Dependents: HelloWorld_ST_Sensors MOTENV_Mbed mbed-os-mqtt-client DISCO-IOT01_HomeEnv ... more
Revision 6:308889c4d074, committed 2017-10-18
- Comitter:
- mapellil
- Date:
- Wed Oct 18 11:14:26 2017 +0200
- Parent:
- 5:1af013474759
- Commit message:
- Fixed sensor initialization
Changed in this revision
lis3mdl_class.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 1af013474759 -r 308889c4d074 lis3mdl_class.cpp --- a/lis3mdl_class.cpp Fri Oct 06 12:17:06 2017 +0000 +++ b/lis3mdl_class.cpp Wed Oct 18 11:14:26 2017 +0200 @@ -90,9 +90,9 @@ { uint8_t tmp1 = 0x00; MAGNETO_InitTypeDef *initStructure = LIS3MDL_Init; + MAGNETO_InitTypeDef tempInit; if (initStructure == NULL) {// default params - MAGNETO_InitTypeDef tempInit; tempInit.M_FullScale = LIS3MDL_M_FS_4; tempInit.M_OperatingMode = LIS3MDL_M_MD_CONTINUOUS; tempInit.M_XYOperativeMode = LIS3MDL_M_OM_HP;