Closed fgervais closed 4 years ago
Any suggestions about the linter errors?
see https://learn.adafruit.com/improve-your-code-with-pylint for a guide!
I see. Well I get the errors but let say "Method could be a function". I agree but I still feel like it makes more sense to have it in the class since it's functionally related and also there is no other functions in the module currently so I feel it would look weird to add two lonely little functions.
Then "Too many branches", I think this part fits well with the code already in place and what mlx90640-library has which everything seems to be translated from.
Lastly "Simplify chained comparison between the operands", well I kept it close to the mlx90640-library. I feel the code is pretty clear too.
From my point of view I would ignore all those but I can change any part of the code so it suits your tastes better.
Should I put the utility method _UniqueListPairs()
outside of the class?
Thank you @fgervais !
I'm glad I could help :)
I got a mlx90640 with a defective pixel and even though the datasheet says that it's acceptable up to 4, the library was not able to recover and was crashing when trying to calculate the forth root of a negative number:
I added the missing code to handle broken adjacent pixels that had been left out from the library port (noted as TODO) and added the code to detect and "fix" broken pixels when doing the conversion to Celsius.
I must say, I made the dumbest fix but hey, at least it's a valid option recommended by the datasheet :). If I end up needing the more advanced interpolation fixes I'll gladly PR them later on.