Merge branch 'next'

master
Ismael Gomez 7 years ago
commit cf032fea53

@ -188,8 +188,6 @@ int main(int argc, char **argv) {
snr_points = 1; snr_points = 1;
} }
float Gain = 2500;
for (i = 0; i < snr_points; i++) { for (i = 0; i < snr_points; i++) {
frame_cnt = 0; frame_cnt = 0;
errors = 0; errors = 0;

@ -197,11 +197,11 @@ void ue::process_pdu(uint8_t* pdu, uint32_t nof_bytes, uint32_t tstamp)
// Save contention resolution if lcid == 0 // Save contention resolution if lcid == 0
if (mac_msg_ul.get()->get_sdu_lcid() == 0 && route_pdu) { if (mac_msg_ul.get()->get_sdu_lcid() == 0 && route_pdu) {
uint32_t nbytes = srslte::sch_subh::MAC_CE_CONTRES_LEN; int nbytes = srslte::sch_subh::MAC_CE_CONTRES_LEN;
if (mac_msg_ul.get()->get_payload_size() >= nbytes) { if (mac_msg_ul.get()->get_payload_size() >= nbytes) {
uint8_t *ue_cri_ptr = (uint8_t *) &conres_id; uint8_t *ue_cri_ptr = (uint8_t *) &conres_id;
uint8_t *pkt_ptr = mac_msg_ul.get()->get_sdu_ptr(); // Warning here: we want to include the uint8_t *pkt_ptr = mac_msg_ul.get()->get_sdu_ptr(); // Warning here: we want to include the
for (uint32_t i = 0; i < nbytes; i++) { for (int i = 0; i < nbytes; i++) {
ue_cri_ptr[nbytes - i - 1] = pkt_ptr[i]; ue_cri_ptr[nbytes - i - 1] = pkt_ptr[i];
} }
} else { } else {

@ -154,7 +154,7 @@ void demux::process_sch_pdu(srslte::sch_pdu *pdu_msg)
if (pdu_msg->get()->get_sdu_lcid() == 0) { if (pdu_msg->get()->get_sdu_lcid() == 0) {
uint8_t *x = pdu_msg->get()->get_sdu_ptr(); uint8_t *x = pdu_msg->get()->get_sdu_ptr();
uint32_t sum = 0; uint32_t sum = 0;
for (uint32_t i=0;i<pdu_msg->get()->get_payload_size();i++) { for (int i=0;i<pdu_msg->get()->get_payload_size();i++) {
sum += x[i]; sum += x[i];
} }
if (sum == 0) { if (sum == 0) {

Loading…
Cancel
Save