sparkfun / SparkFun_AS3935_Lightning_Detector_Arduino_Library

Other
37 stars 19 forks source link

Fixed issues with CAP_MASK and getTuneCap() #9

Closed fourstix closed 5 years ago

fourstix commented 5 years ago

These two changes address the problem with tuneCap() and readTuneCap(). In SparkFun_AS3935.h the constant CAP_MASK is changed to match the register mapping in the data sheet for register 0x08. In SparkFun_AS3935.cpp the logic is changed so the register value is Anded with the positive mask (not with the negation of the mask).

fourstix commented 5 years ago

I should have noted that these changes will close issue #8 Problem with tuneCap() and readTuneCap()

edspark commented 5 years ago

This looks great, thank you very much @fourstix !