Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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 |
--- 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;