STMicroelectronics / STMems_Standard_C_drivers

Platform-independent drivers for STMicroelectronics MEMS motion and environmental sensors, based on standard C programming language.
BSD 3-Clause "New" or "Revised" License
732 stars 519 forks source link

More typos -> LSM6DSO #146

Open capiman opened 3 years ago

capiman commented 3 years ago

I was initially not aware that each directory is for one sensor. I thought it is a software variant (or X as place holder for some hardware variants) and even wanted to question here what is different between each directory, e.g. like LSM6DSO, LSM6DSOX, LSM6DSO32, LSM6DSO32X.

Question beside: Are they in some kind (backward) compatible? So e.g. code for LSM6DSO can run on all other mentioned device (when not using the additional features)?

But back to LSM6DSO source code:

Minor: https://github.com/STMicroelectronics/STMems_Standard_C_drivers/blob/master/lsm6dso_STdC/examples/lsm6dso_self_test.c#L307

LIS2DH12_GY_ST_NEGATIVE -> LSM6DSO_GY_ST_NEGATIVE

https://github.com/STMicroelectronics/STMems_Standard_C_drivers/blob/master/lsm6dso_STdC/examples/lsm6dso_self_test.c#L348

lsm6dso_xl_data_rate_set(&dev_ctx, LSM6DSO_GY_ODR_OFF); -> lsm6dso_gy_data_rate_set(&dev_ctx, LSM6DSO_GY_ODR_OFF);

(same as https://github.com/STMicroelectronics/STMems_Standard_C_drivers/issues/142 )

I am at the moment using only self test code, so not checked the other example files.

capiman commented 3 years ago

Searching over complete repo gives following result:

$ grep -r xl_data_rate_set * | grep -e "GY" lsm6ds3tr-c_STdC/examples/lsm6ds3tr_c_self_test.c: lsm6ds3tr_c_xl_data_rate_set(&dev_ctx, LSM6DS3TR_C_GY_ODR_OFF); lsm6dso_STdC/examples/lsm6dso_self_test.c: lsm6dso_xl_data_rate_set(&dev_ctx, LSM6DSO_GY_ODR_OFF); lsm6dsrx_STdC/examples/lsm6dsrx_self_test.c: lsm6dsrx_xl_data_rate_set(&dev_ctx, LSM6DSRX_GY_ODR_OFF); $

lsm6dsrx_STdC/examples/lsm6dsrx_self_test.c: //lsm6dsrx_xl_self_test_set(&dev_ctx, LIS2DH12_XL_ST_NEGATIVE);

avisconti commented 3 years ago

I was initially not aware that each directory is for one sensor. I thought it is a software variant (or X as place holder for some hardware variants) and even wanted to question here what is different between each directory, e.g. like LSM6DSO, LSM6DSOX, LSM6DSO32, LSM6DSO32X.

Question beside: Are they in some kind (backward) compatible? So e.g. code for LSM6DSO can run on all other mentioned device (when not using the additional features)?

They are somehow backward compatible, yes.

But back to LSM6DSO source code:

Minor: https://github.com/STMicroelectronics/STMems_Standard_C_drivers/blob/master/lsm6dso_STdC/examples/lsm6dso_self_test.c#L307

LIS2DH12_GY_ST_NEGATIVE -> LSM6DSO_GY_ST_NEGATIVE

https://github.com/STMicroelectronics/STMems_Standard_C_drivers/blob/master/lsm6dso_STdC/examples/lsm6dso_self_test.c#L348

lsm6dso_xl_data_rate_set(&dev_ctx, LSM6DSO_GY_ODR_OFF); -> lsm6dso_gy_data_rate_set(&dev_ctx, LSM6DSO_GY_ODR_OFF);

(same as #142 )

I am at the moment using only self test code, so not checked the other example files.

OK, thanks! Maybe you can try to provide again a PR, like you already did. Just mention the number of this bug with '#'