mayeranalytics / pySX127x

This is a python interface to the Semtech SX127x, HopeRF RFM9x, Microchip RN2483 long range, low power transceiver families.
GNU Affero General Public License v3.0
171 stars 116 forks source link

fixed bug causing no tx_done #16

Closed bjcarne closed 7 years ago

bjcarne commented 7 years ago

This is in relation to issue https://github.com/mayeranalytics/pySX127x/issues/6

It appears as though clearing the IRQ flags is not accomplished by sending a 0 to the IRQ_FLAGS register. This was discovered by https://github.com/thomasverbeke/pySX127x/issues/1#issuecomment-178582087

I have implemented a new clear_irq_flags function in LoRa.py which allows users to select which flags to clear. I have tried to keep the code in line with your other functions. The main difference is that I have made use of MASK.IRQ_FLAGS in constants.py in the set_bit function.

Thanks heaps for all your work to date on this LoRa interface. It's been a great help.