mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-07 16:00:35 +00:00
Remove some warnings
This commit is contained in:
parent
9fef3fbfe9
commit
74f08ede2f
@ -73,8 +73,8 @@
|
||||
#define MAX_PHASE_STEP_RAD 0.999999999534339 // 1 - pow(2,-31);
|
||||
|
||||
|
||||
bool gps_fpga_acquisition_8sc::init(unsigned int fft_size, unsigned int nsamples_total, long freq, unsigned int doppler_max, unsigned int doppler_step, int num_doppler_bins, long fs_in, unsigned select_queue)
|
||||
{
|
||||
bool gps_fpga_acquisition_8sc::init(unsigned int fft_size, unsigned int nsamples_total, long freq, unsigned int doppler_max, unsigned int doppler_step, int num_doppler_bins, long fs_in, unsigned select_queue)
|
||||
{
|
||||
float phase_step_rad_fpga;
|
||||
|
||||
d_phase_step_rad_vector = new float[num_doppler_bins];
|
||||
@ -132,13 +132,13 @@ bool gps_fpga_acquisition_8sc::set_local_code(gr_complex* fft_codes)
|
||||
|
||||
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()
|
||||
{
|
||||
|
||||
|
||||
if ((d_fd = open(d_device_io_name, O_RDWR | O_SYNC )) == -1)
|
||||
{
|
||||
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";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -204,7 +201,6 @@ bool gps_fpga_acquisition_8sc::free()
|
||||
|
||||
unsigned gps_fpga_acquisition_8sc::fpga_acquisition_test_register(unsigned writeval)
|
||||
{
|
||||
|
||||
unsigned readval;
|
||||
// write value to test register
|
||||
d_map_base[15] = writeval;
|
||||
@ -214,6 +210,7 @@ unsigned gps_fpga_acquisition_8sc::fpga_acquisition_test_register(unsigned write
|
||||
return readval;
|
||||
}
|
||||
|
||||
|
||||
void gps_fpga_acquisition_8sc::fpga_configure_acquisition_local_code(lv_16sc_t fft_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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -263,10 +258,9 @@ void gps_fpga_acquisition_8sc::configure_acquisition()
|
||||
d_map_base[0] = d_select_queue;
|
||||
d_map_base[1] = d_nsamples_total;
|
||||
d_map_base[2] = d_nsamples;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
void gps_fpga_acquisition_8sc::set_phase_step(unsigned int doppler_index)
|
||||
{
|
||||
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
|
||||
|
||||
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)
|
||||
@ -297,11 +290,13 @@ void gps_fpga_acquisition_8sc::read_acquisition_results(uint32_t* max_index, flo
|
||||
|
||||
}
|
||||
|
||||
|
||||
void gps_fpga_acquisition_8sc::block_samples()
|
||||
{
|
||||
d_map_base[14] = 1; // block the samples
|
||||
}
|
||||
|
||||
|
||||
void gps_fpga_acquisition_8sc::unblock_samples()
|
||||
{
|
||||
d_map_base[14] = 0; // unblock the samples
|
||||
|
Loading…
Reference in New Issue
Block a user