adafruit / Adafruit_AS7341

Other
29 stars 18 forks source link

added saturation check functions #15

Open christakahashi opened 3 years ago

christakahashi commented 3 years ago

Added two functions to check if the last readings were analog or digital saturated. This will help when checking if gains and integration time are appropriate especially if the light source has changed. This should not change how any code already written works. It does add a byte of memory usage and a few cycles when polling for a result. It does not add any additional bus transactions as the flag bits were already being read but not saved or used.

I've done my best to make the code consistent with the rest of the library.