sparkfun / SparkFun_AS3935_Lightning_Detector_Arduino_Library

Other
37 stars 19 forks source link

Constructor uses SF_AS3935_I2C_ADDRESS instead of int #3

Closed mday64 closed 5 years ago

mday64 commented 5 years ago

When using PlatformIO to build, it produces a warning for the constructor because it is trying to implicitly convert an int (the address parameter) to enum SF_AS3935_I2C_ADDRESS (the _address member variable). To fix the warning, I chose to change the type of the constructor's parameter to be enum SF_AS3935_I2C_ADDRESS. I think that makes it more explicit which addresses are allowed. Alternatively, the _address member could have been changed to type int.

edspark commented 5 years ago

Ah yes! Very nice and thank you very much for the pull request!