Closed topherCantrell closed 2 years ago
That's a good catch. Thank you for the really direct references, it was really easy to look up and see. I tried going through the Sensirion provided c code to see what they use, but c is not my specialty. I've got a sensor so I should be able to give it a shot regardless
! can y'all submit a PR?
Yup! I should have one in tonight
Just adding to document:
Closing. Fixed with #12.
Section 3.8.2 of the SCD4x datasheet says to check the least significant 11 bits of the returned status. But the code on line 211 in "data_ready" only checks 8+2 = 10 bits. I've never ever seen that unchecked bit get set when data was not ready, but just in case it ever does -- we should AND the MSB with 7 (3 bits + 8) instead of 3 (2 bits + 8) to follow the datasheet.