1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-08 16:30:35 +00:00

Remove some warnings

This commit is contained in:
Carles Fernandez 2017-05-08 23:03:42 +02:00
parent 9fef3fbfe9
commit 74f08ede2f

View File

@ -132,13 +132,13 @@ bool gps_fpga_acquisition_8sc::set_local_code(gr_complex* fft_codes)
for (i=0;i<d_nsamples_total;i++) for (i=0;i<d_nsamples_total;i++)
{ {
if(abs(fft_codes[i].real()) > max) if(std::abs(fft_codes[i].real()) > max)
{ {
max = abs(fft_codes[i].real()); max = std::abs(fft_codes[i].real());
} }
if(abs(fft_codes[i].imag()) > max) if(std::abs(fft_codes[i].imag()) > max)
{ {
max = abs(fft_codes[i].imag()); max = std::abs(fft_codes[i].imag());
} }
} }
@ -156,8 +156,6 @@ bool gps_fpga_acquisition_8sc::set_local_code(gr_complex* fft_codes)
gps_fpga_acquisition_8sc::gps_fpga_acquisition_8sc() gps_fpga_acquisition_8sc::gps_fpga_acquisition_8sc()
{ {
if ((d_fd = open(d_device_io_name, O_RDWR | O_SYNC )) == -1) if ((d_fd = open(d_device_io_name, O_RDWR | O_SYNC )) == -1)
{ {
LOG(WARNING) << "Cannot open deviceio" << d_device_io_name; LOG(WARNING) << "Cannot open deviceio" << d_device_io_name;
@ -168,7 +166,6 @@ gps_fpga_acquisition_8sc::gps_fpga_acquisition_8sc()
{ {
LOG(WARNING) << "Cannot map the FPGA acquisition module into user memory"; LOG(WARNING) << "Cannot map the FPGA acquisition module into user memory";
} }
} }
@ -204,7 +201,6 @@ bool gps_fpga_acquisition_8sc::free()
unsigned gps_fpga_acquisition_8sc::fpga_acquisition_test_register(unsigned writeval) unsigned gps_fpga_acquisition_8sc::fpga_acquisition_test_register(unsigned writeval)
{ {
unsigned readval; unsigned readval;
// write value to test register // write value to test register
d_map_base[15] = writeval; d_map_base[15] = writeval;
@ -214,6 +210,7 @@ unsigned gps_fpga_acquisition_8sc::fpga_acquisition_test_register(unsigned write
return readval; return readval;
} }
void gps_fpga_acquisition_8sc::fpga_configure_acquisition_local_code(lv_16sc_t fft_local_code[]) void gps_fpga_acquisition_8sc::fpga_configure_acquisition_local_code(lv_16sc_t fft_local_code[])
{ {
short int local_code; short int local_code;
@ -250,8 +247,6 @@ void gps_fpga_acquisition_8sc::run_acquisition(void)
printf("Tracking_module Interrupt number %d\n", irq_count); printf("Tracking_module Interrupt number %d\n", irq_count);
} }
} }
@ -263,10 +258,9 @@ void gps_fpga_acquisition_8sc::configure_acquisition()
d_map_base[0] = d_select_queue; d_map_base[0] = d_select_queue;
d_map_base[1] = d_nsamples_total; d_map_base[1] = d_nsamples_total;
d_map_base[2] = d_nsamples; d_map_base[2] = d_nsamples;
} }
void gps_fpga_acquisition_8sc::set_phase_step(unsigned int doppler_index) void gps_fpga_acquisition_8sc::set_phase_step(unsigned int doppler_index)
{ {
float phase_step_rad_real; float phase_step_rad_real;
@ -279,7 +273,6 @@ void gps_fpga_acquisition_8sc::set_phase_step(unsigned int doppler_index)
phase_step_rad_int = (int32_t) (phase_step_rad_int_temp*(536870912)); // * 2^29 (in total it makes x2^31 in two steps to avoid the warnings phase_step_rad_int = (int32_t) (phase_step_rad_int_temp*(536870912)); // * 2^29 (in total it makes x2^31 in two steps to avoid the warnings
d_map_base[3] = phase_step_rad_int; d_map_base[3] = phase_step_rad_int;
} }
void gps_fpga_acquisition_8sc::read_acquisition_results(uint32_t* max_index, float* max_magnitude, unsigned *initial_sample, float *power_sum) void gps_fpga_acquisition_8sc::read_acquisition_results(uint32_t* max_index, float* max_magnitude, unsigned *initial_sample, float *power_sum)
@ -297,11 +290,13 @@ void gps_fpga_acquisition_8sc::read_acquisition_results(uint32_t* max_index, flo
} }
void gps_fpga_acquisition_8sc::block_samples() void gps_fpga_acquisition_8sc::block_samples()
{ {
d_map_base[14] = 1; // block the samples d_map_base[14] = 1; // block the samples
} }
void gps_fpga_acquisition_8sc::unblock_samples() void gps_fpga_acquisition_8sc::unblock_samples()
{ {
d_map_base[14] = 0; // unblock the samples d_map_base[14] = 0; // unblock the samples