this library do not always use well defined integers.
For example the irq is a unsigned 8 bit integer uns8, but the function accepts int which could be any size.
I think the library should be refactored and use always well defined integers like uns8.
Some bad functions:
void autoTuneCaps(int irq);
sgn32 getFrequency(int irq);
void freqPerTuneCaps(int fdiv, int irq);
void auto_calibrate(int irq);
class AS3935Class
{
private:
uns8 _irq; // here well defined
public:
void init(int IRQ_pin); // bad
int calculateDistance();
int getDivisionRatio();
unsigned int getIntensity();
};
Hi,
this library do not always use well defined integers. For example the
irq
is a unsigned 8 bit integeruns8
, but the function acceptsint
which could be any size. I think the library should be refactored and use always well defined integers likeuns8
.Some bad functions: