drcpattison / DPEng_ICM20948_AK09916

DPEng's Arduino library for the ICM-20948 breakout board with magnetometer calibration and AHRS examples
MIT License
25 stars 8 forks source link

Lighter event functions, customizable lowpass #1

Closed Thorinair closed 5 years ago

Thorinair commented 5 years ago

I have done some changes to the original library:

drcpattison commented 5 years ago

Hi Thorinair,

Thanks for adding the extra functionality to allow independent retrieval of accel and mag data as well as configuration of the low pass filter response rate. It is much appreciated and I'm sure it will be useful to the wider community.

I just have one small comment on the naming of the third parameter of the begin function as "lowAccel", I feel it is a little ambiguous and may confusion in the future if more functionality is added for example an option to toggle the low power mode. May I suggest "lowpassAccel" or "dlpfcfgAccel" to make it a little more explicit? Otherwise I am happy to merge this request.

Regards, DP Eng

Thorinair commented 5 years ago

Good suggestion. I have renamed the parameter to lowpassAccel, and also added it to the comment header of the begin function.

drcpattison commented 5 years ago

Many thanks Thorinair.

I was just thinking that modifying the begin function will also affect the three example sketches. Are you able to update those also?

Regards, DP Eng

Thorinair commented 5 years ago

I will check later today if they still work, but theoretically, it shouldn't be required because the third parameter has a default value set. Might still be useful to point out that the parameter exists though.

drcpattison commented 5 years ago

That's true, as long as the example sketches still work I'm happy.

Thorinair commented 5 years ago

I have now updated the examples. I did end up changing the begin function in them, just to highlight that the lowpass can indeed be set. I have also changed the sensorapi example to use 115200 baud serial like the other examples, mostly because of consistency. I have tested all 3 to make sure they work.