pimoroni / mlx90640-library

Python library for the MLX90640 thermal camera
https://shop.pimoroni.com/products/mlx90640-thermal-camera-breakout
Apache License 2.0
133 stars 86 forks source link

Wrong bit cleared in MLX90640_SetDeviceMode? #70

Open YuyaNagamatsu opened 3 months ago

YuyaNagamatsu commented 3 months ago

I wonder why the bit 1 instead of 4 is cleared in MLX90640_SetDeviceMode function. https://github.com/pimoroni/mlx90640-library/commit/fdcac80#diff-8d40bd42b75a93ac01833ca59b08e59ba1a645daddb60a506f0e4a8dff783a14R275

Maybe few users need to reselect the SubPage 0 from the SubPage 1, so there will be no problem.

YuyaNagamatsu commented 3 months ago

I guess this function aims to update the SubPages Mode bit [or the Enable Data Hold bit?] in the Control Register 0x800D. Then it should set the bit 0 [or 2?] (neither the bit 1 nor the bit 4)? Am I misunderstanding how to set the SubPages Mode?