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).
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).