diff --git a/srslte/examples/pdsch_enodeb.c b/srslte/examples/pdsch_enodeb.c index d65429808..491d6272f 100644 --- a/srslte/examples/pdsch_enodeb.c +++ b/srslte/examples/pdsch_enodeb.c @@ -51,7 +51,8 @@ char *output_file_name = NULL; srslte_cell_t cell = { 6, // nof_prb 1, // nof_ports - 1, // cell_id + 0, // bw idx + 0, // cell_id SRSLTE_CP_NORM, // cyclic prefix SRSLTE_PHICH_R_1, // PHICH resources SRSLTE_PHICH_NORM // PHICH length @@ -588,9 +589,6 @@ int main(int argc, char **argv) { /* Transform to OFDM symbols */ srslte_ofdm_rx_sf(&ifft, sf_buffer, output_buffer); - float norm_factor = (float) cell.nof_prb/15/sqrtf(ra_dl.prb_alloc.slot[0].nof_prb); - srslte_vec_sc_prod_cfc(output_buffer, uhd_amp*norm_factor, output_buffer, SRSLTE_SF_LEN_PRB(cell.nof_prb)); - /* send to file or usrp */ if (output_file_name) { if (!null_file_sink) { @@ -599,7 +597,9 @@ int main(int argc, char **argv) { usleep(1000); } else { #ifndef DISABLE_UHD - srslte_vec_sc_prod_cfc(output_buffer, uhd_amp, output_buffer, sf_n_samples); + // FIXME + float norm_factor = (float) cell.nof_prb/15/sqrtf(ra_dl.prb_alloc.slot[0].nof_prb); + srslte_vec_sc_prod_cfc(output_buffer, uhd_amp*norm_factor, output_buffer, SRSLTE_SF_LEN_PRB(cell.nof_prb)); cuhd_send(uhd, output_buffer, sf_n_samples, true); #endif } diff --git a/srslte/examples/pdsch_ue.c b/srslte/examples/pdsch_ue.c index 7f1c7b337..ecb1af658 100644 --- a/srslte/examples/pdsch_ue.c +++ b/srslte/examples/pdsch_ue.c @@ -501,8 +501,12 @@ int main(int argc, char **argv) { sf_cnt++; } // Main loop - pthread_cancel(plot_thread); - pthread_join(plot_thread, NULL); + if (!prog_args.disable_plots) { + if (!pthread_kill(plot_thread, 0)) { + pthread_kill(plot_thread, SIGHUP); + pthread_join(plot_thread, NULL); + } + } srslte_ue_dl_free(&ue_dl); srslte_ue_sync_free(&ue_sync); diff --git a/srslte/lib/phch/src/pbch.c b/srslte/lib/phch/src/pbch.c index ccfd004d3..5cdd0247f 100644 --- a/srslte/lib/phch/src/pbch.c +++ b/srslte/lib/phch/src/pbch.c @@ -482,7 +482,7 @@ int srslte_pbch_decode(srslte_pbch_t *q, cf_t *slot1_symbols, cf_t *ce_slot1[SRS if (nant != 3) { DEBUG("Trying %d TX antennas with %d frames\n", nant, q->frame_idx); - /* in conctrol channels, only diversity is supported */ + /* in control channels, only diversity is supported */ if (nant == 1) { /* no need for layer demapping */ srslte_predecoding_single(&q->precoding, q->symbols[0], q->ce[0], q->d, @@ -569,7 +569,6 @@ int srslte_pbch_encode(srslte_pbch_t *q, uint8_t bch_payload[BCH_PAYLOAD_LEN], c srslte_convcoder_encode(&q->encoder, q->data, q->data_enc, BCH_PAYLOADCRC_LEN); srslte_rm_conv_tx(q->data_enc, BCH_ENCODED_LEN, q->rm_b, 4 * nof_bits); - } srslte_scrambling_b_offset(&q->seq, &q->rm_b[q->frame_idx * nof_bits],