mirror of https://github.com/PentHertz/srsLTE.git
Changed pdsch_ue freq to double
This commit is contained in:
parent
6439b2bbec
commit
a1ada63e4f
|
@ -85,7 +85,7 @@ typedef struct {
|
|||
uint32_t file_nof_ports;
|
||||
uint32_t file_cell_id;
|
||||
char *rf_args;
|
||||
float rf_freq;
|
||||
double rf_freq;
|
||||
float rf_gain;
|
||||
int net_port;
|
||||
char *net_address;
|
||||
|
@ -184,7 +184,7 @@ void parse_args(prog_args_t *args, int argc, char **argv) {
|
|||
args->time_offset = atoi(argv[optind]);
|
||||
break;
|
||||
case 'f':
|
||||
args->rf_freq = atof(argv[optind]);
|
||||
args->rf_freq = strtod(argv[optind], NULL);
|
||||
break;
|
||||
case 'n':
|
||||
args->nof_subframes = atoi(argv[optind]);
|
||||
|
@ -325,8 +325,8 @@ int main(int argc, char **argv) {
|
|||
srslte_rf_set_master_clock_rate(&rf, 30.72e6);
|
||||
|
||||
/* set receiver frequency */
|
||||
printf("Tunning receiver to %.3f MHz\n", (double ) prog_args.rf_freq/1000000);
|
||||
srslte_rf_set_rx_freq(&rf, (double) prog_args.rf_freq);
|
||||
printf("Tunning receiver to %.3f MHz\n", prog_args.rf_freq/1000000);
|
||||
srslte_rf_set_rx_freq(&rf, prog_args.rf_freq);
|
||||
srslte_rf_rx_wait_lo_locked(&rf);
|
||||
|
||||
uint32_t ntrial=0;
|
||||
|
|
|
@ -212,7 +212,7 @@ int rf_blade_open(char *args, void **h, bool create_thread_gain, bool tx_gain_sa
|
|||
fprintf(stderr, "Failed to set RX VGA1 gain: %s\n", bladerf_strerror(status));
|
||||
return status;
|
||||
}
|
||||
status = bladerf_set_txvga1(handler->dev, -10);
|
||||
status = bladerf_set_txvga1(handler->dev, -8);
|
||||
if (status != 0) {
|
||||
fprintf(stderr, "Failed to set TX VGA1 gain: %s\n", bladerf_strerror(status));
|
||||
return status;
|
||||
|
@ -253,6 +253,7 @@ double rf_blade_set_rx_srate(void *h, double freq)
|
|||
fprintf(stderr, "Failed to set bandwidth = %u: %s\n", handler->rx_rate, bladerf_strerror(status));
|
||||
return -1;
|
||||
}
|
||||
printf("Set RX sampling rate %.2f Mhz, filter BW: %.2f Mhz\n", (float) handler->rx_rate/1e6, (float) bw/1e6);
|
||||
return (double) handler->rx_rate;
|
||||
}
|
||||
|
||||
|
@ -328,7 +329,8 @@ double rf_blade_get_tx_gain(void *h)
|
|||
double rf_blade_set_rx_freq(void *h, double freq)
|
||||
{
|
||||
rf_blade_handler_t *handler = (rf_blade_handler_t*) h;
|
||||
int status = bladerf_set_frequency(handler->dev, BLADERF_MODULE_RX, (uint32_t) freq);
|
||||
uint32_t f_int = (uint32_t) round(freq);
|
||||
int status = bladerf_set_frequency(handler->dev, BLADERF_MODULE_RX, f_int);
|
||||
if (status != 0) {
|
||||
fprintf(stderr, "Failed to set samplerate = %u: %s\n",
|
||||
(uint32_t) freq, bladerf_strerror(status));
|
||||
|
@ -340,7 +342,8 @@ double rf_blade_set_rx_freq(void *h, double freq)
|
|||
double rf_blade_set_tx_freq(void *h, double freq)
|
||||
{
|
||||
rf_blade_handler_t *handler = (rf_blade_handler_t*) h;
|
||||
int status = bladerf_set_frequency(handler->dev, BLADERF_MODULE_TX, (uint32_t) freq);
|
||||
uint32_t f_int = (uint32_t) round(freq);
|
||||
int status = bladerf_set_frequency(handler->dev, BLADERF_MODULE_TX, f_int);
|
||||
if (status != 0) {
|
||||
fprintf(stderr, "Failed to set samplerate = %u: %s\n",
|
||||
(uint32_t) freq, bladerf_strerror(status));
|
||||
|
|
Loading…
Reference in New Issue