Skip to content

Commit 0f04476

Browse files
committed
Fixes calculation when reading the outputDataRate
1 parent 17f55ef commit 0f04476

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SparkFun_Qwiic_KX13X.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ float QwiicKX13xCore::readOutputDataRate(){
180180
readRegister(&tempRegVal, KX13X_ODCNTL);
181181
tempRegVal &= 0x0F;
182182
tempRegVal = (float)tempRegVal;
183-
return (0.78 * (2 * tempRegVal));
183+
return (0.78 * (pow(2,tempRegVal));
184184

185185
}
186186

0 commit comments

Comments
 (0)