sparkfun/SparkFun_ICM-20948_ArduinoLibrary

Left-shift instead of right-shift when setting sample rate

yanivamichy opened this issue · 1 comments

Hi, while configuring my sensor I noticed the following:
Inside ICM_20948_set_sample_rate the high bytes are taken by left shifting instead of right shifting (in line 795 of ICM_20948_C.c)
"uint8_t div1 = (smplrt.a << 8);"

these bytes are almost always zero so it mostly won't matter, but it is an instant fix anyhow.
yaniv.

Hi Yaniv (@yanivamichy ),

Excellent find - thank you.

Very best wishes,
Paul