File tree Expand file tree Collapse file tree 2 files changed +7
-16
lines changed Expand file tree Collapse file tree 2 files changed +7
-16
lines changed Original file line number Diff line number Diff line change @@ -962,8 +962,9 @@ void LoRaWANStack::mcps_indication_handler()
962
962
_rx_msg.msg .mcps_indication .type = mcps_indication->type ;
963
963
964
964
// Notify application about received frame..
965
- tr_debug (" Packet Received %d bytes" ,
966
- _rx_msg.msg .mcps_indication .buffer_size );
965
+ tr_debug (" Packet Received %d bytes, Port=%d" ,
966
+ _rx_msg.msg .mcps_indication .buffer_size ,
967
+ mcps_indication->port );
967
968
_rx_msg.receive_ready = true ;
968
969
send_event_to_application (RX_DONE);
969
970
}
Original file line number Diff line number Diff line change @@ -669,23 +669,13 @@ void LoRaMac::on_radio_tx_done(lorawan_time_t timestamp)
669
669
void LoRaMac::on_radio_rx_done (const uint8_t * const payload, uint16_t size,
670
670
int16_t rssi, int8_t snr)
671
671
{
672
- // stop the RX1 timer here if its the first RX slot.
673
- // If the MIC will pass we will stop RX2 timer as well later.
674
- // If its RX2, stop RX2 timer.
675
- if (_params.rx_slot == RX_SLOT_WIN_1) {
672
+ if (_device_class == CLASS_C && !_continuous_rx2_window_open) {
673
+ open_rx2_window ();
674
+ } else {
676
675
_lora_time.stop (_params.timers .rx_window1_timer );
677
- } else if (_params.rx_slot == RX_SLOT_WIN_2) {
678
- _lora_time.stop (_params.timers .rx_window2_timer );
676
+ _lora_phy.put_radio_to_sleep ();
679
677
}
680
678
681
- if (_device_class == CLASS_C) {
682
- if (!_continuous_rx2_window_open) {
683
- open_rx2_window ();
684
- }
685
- } else {
686
- _lora_phy.put_radio_to_sleep ();
687
- }
688
-
689
679
loramac_mhdr_t mac_hdr;
690
680
uint8_t pos = 0 ;
691
681
mac_hdr.value = payload[pos++];
You can’t perform that action at this time.
0 commit comments