mirror of https://github.com/ARMmbed/mbed-os.git
Adding port in trace & streamlining continuous RX2
parent
eab2bad593
commit
ffb0698ce7
|
@ -962,8 +962,9 @@ void LoRaWANStack::mcps_indication_handler()
|
|||
_rx_msg.msg.mcps_indication.type = mcps_indication->type;
|
||||
|
||||
// Notify application about received frame..
|
||||
tr_debug("Packet Received %d bytes",
|
||||
_rx_msg.msg.mcps_indication.buffer_size);
|
||||
tr_debug("Packet Received %d bytes, Port=%d",
|
||||
_rx_msg.msg.mcps_indication.buffer_size,
|
||||
mcps_indication->port);
|
||||
_rx_msg.receive_ready = true;
|
||||
send_event_to_application(RX_DONE);
|
||||
}
|
||||
|
|
|
@ -669,23 +669,13 @@ void LoRaMac::on_radio_tx_done(lorawan_time_t timestamp)
|
|||
void LoRaMac::on_radio_rx_done(const uint8_t* const payload, uint16_t size,
|
||||
int16_t rssi, int8_t snr)
|
||||
{
|
||||
// stop the RX1 timer here if its the first RX slot.
|
||||
// If the MIC will pass we will stop RX2 timer as well later.
|
||||
// If its RX2, stop RX2 timer.
|
||||
if (_params.rx_slot == RX_SLOT_WIN_1) {
|
||||
if (_device_class == CLASS_C && !_continuous_rx2_window_open) {
|
||||
open_rx2_window();
|
||||
} else {
|
||||
_lora_time.stop(_params.timers.rx_window1_timer);
|
||||
} else if (_params.rx_slot == RX_SLOT_WIN_2) {
|
||||
_lora_time.stop(_params.timers.rx_window2_timer);
|
||||
_lora_phy.put_radio_to_sleep();
|
||||
}
|
||||
|
||||
if (_device_class == CLASS_C) {
|
||||
if (!_continuous_rx2_window_open) {
|
||||
open_rx2_window();
|
||||
}
|
||||
} else {
|
||||
_lora_phy.put_radio_to_sleep();
|
||||
}
|
||||
|
||||
loramac_mhdr_t mac_hdr;
|
||||
uint8_t pos = 0;
|
||||
mac_hdr.value = payload[pos++];
|
||||
|
|
Loading…
Reference in New Issue