Closed tealbrains closed 4 years ago
The mode seems to be locked to HR because of the if statement in setMode():
if (mode > LIS2DH12_HR_12bit) mode = LIS2DH12_HR_12bit; //Default to 12 bit
see the enum:
typedef enum { LIS2DH12_HR_12bit = 0, LIS2DH12_NM_10bit = 1, LIS2DH12_LP_8bit = 2, } lis2dh12_op_md_t;
if (mode > LIS2DH12_LP_8bit) mode = LIS2DH12_HR_12bit; //Default to 12 bit
Nice find! Thanks for reporting. Indeed. Feel like fixing it with a PR or do you need me to?
No worries, I will issue a PR later today
Subject of the issue
The mode seems to be locked to HR because of the if statement in setMode():
see the enum:
Proposed fix: