adafruit / TinyLoRa

LoRaWAN Library
69 stars 38 forks source link

Add RFM_Read function #15

Closed wero1414 closed 6 years ago

wero1414 commented 6 years ago

Hi!

I just create this PR to add the function of reading the registers of the RFM95 and also, a use case where gets verified the version of the chip at the begin function just to be sure that the connections works!

ladyada commented 6 years ago

hiya instead of begin() print/hanging, which could cause a lot of confusion, please change begin() to return true or false. then the example code should check the return of begin and print error message there. (libraries should not serial.print or hang :)

wero1414 commented 6 years ago

Shure! I thought on do it that way but as i saw that in the library youre using print i just used the same way, let me do those changes!

wero1414 commented 6 years ago

The problem with travis seems to be the part of doxygen and its a warning how can i add it to doxygen?

/home/travis/build/adafruit/TinyLoRa/TinyLoRa.h:94: warning: return type of member TinyLoRa::begin is not documented

sabas1080 commented 6 years ago

Change @ brief and @ param @wero1414

https://github.com/adafruit/TinyLoRa/blob/master/TinyLoRa.cpp#L268

brentru commented 6 years ago

@wero1414 Add a @return tag to TinyLoRa.begin(). It wasn't throwing this error earlier because the function originally didn't return anything.

Underneath the @brief tag on this line: https://github.com/adafruit/TinyLoRa/blob/master/TinyLoRa.cpp#L272

add a @return tag: @return True if the RFM has been initialized.

I made this change locally and Doxygen didn't throw an error. Once travis builds without this error, I'll squash/merge and do a new release of the lib.