Fix Fifo Pointer in Continuous Mode

In continuous mode we need to check and set the fifo pointer before every read, otherwise data may be lost.
pull/12890/head
Eric Marks 2020-04-29 07:57:23 -05:00
parent 4f9d21b16a
commit 846f30cd61
2 changed files with 2 additions and 0 deletions

View File

@ -1826,6 +1826,7 @@ void SX1272_LoRaRadio::handle_dio0_irq()
}
_rf_settings.lora_packet_handler.size = read_register(REG_LR_RXNBBYTES);
write_to_register(REG_LR_FIFOADDRPTR, read_register(REG_LR_FIFORXCURRENTADDR));
read_fifo(_data_buffer, _rf_settings.lora_packet_handler.size);
if (_rf_settings.lora.rx_continuous == false) {

View File

@ -1975,6 +1975,7 @@ void SX1276_LoRaRadio::handle_dio0_irq()
}
_rf_settings.lora_packet_handler.size = read_register(REG_LR_RXNBBYTES);
write_to_register(REG_LR_FIFOADDRPTR, read_register(REG_LR_FIFORXCURRENTADDR));
read_fifo(_data_buffer, _rf_settings.lora_packet_handler.size);
if (_rf_settings.lora.rx_continuous == false) {