Cannot change LoRa data rates - RadioHead library broken?

Started by dave_sausages, September 08, 2016, 11:34:48 PM

dave_sausages

So I need to extend my LoRa Moteino's range. So I went to change the data rates to the long range options, but can't.

When I use put this line into my sketch
rf95.setModemConfig(3);


I get this error
exit status 1
invalid conversion from 'int' to 'RH_RF95::ModemConfigChoice' [-fpermissive]


Which makes no sense to me because the exact line of code is used by a guy on this forum and has no issues, it compiles fine. https://forum.arduino.cc/index.php?topic=403955.0

I can't understand why it would give me that error other than the library doesn't work correctly.

Any ideas?

*edit* The library info is herehttp://www.airspayce.com/mikem/arduino/RadioHead/classRH__RF95.html


kobuki

I guess you'd need to use a RH_RF95::ModemConfigChoice member, like Bw125Cr48Sf4096?