Commit 664ac4fa authored by Francesco Mani's avatar Francesco Mani

bugfix on last commit

parent c127a5a2
......@@ -362,7 +362,7 @@ void nr_fill_indication(PHY_VARS_gNB *gNB, int frame, int slot_rx, int ULSCH_id,
gNB->rx_pdu_list[num_rx].harq_id = harq_pid;
gNB->rx_pdu_list[num_rx].ul_cqi = cqi;
gNB->rx_pdu_list[num_rx].timing_advance = timing_advance_update;
gNB->rx_pdu_list[num_rx].rssi = 0xffff; // invalid value as this is not yet computed
gNB->rx_pdu_list[num_rx].rssi = 1280 - (10*dB_fixed(2047*2047)-dB_fixed_times10(gNB->pusch_vars[ULSCH_id]->ulsch_power[0]));
if (crc_flag)
gNB->rx_pdu_list[num_rx].pdu_length = 0;
else {
......
......@@ -305,11 +305,11 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
if (UE_scheduling_control->ul_rssi < (100+rssi)) {
UE_scheduling_control->tpc0 = nr_get_tpc(target_snrx10,ul_cqi,30);
UE_scheduling_control->ta_update = timing_advance;
UE_scheduling_control->ul_rssi = rssi;
}
else{
UE_scheduling_control->tpc0 = 1;
}
UE_scheduling_control->ul_rssi = rssi;
#if defined(ENABLE_MAC_PAYLOAD_DEBUG)
LOG_I(MAC, "Printing received UL MAC payload at gNB side: %d \n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment