mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-14 22:27:12 +00:00
Always have a space between // and comment
This commit is contained in:
@@ -257,10 +257,10 @@ void Gr_Complex_Ip_Packet_Source::pcap_callback(__attribute__((unused)) u_char *
|
||||
uh = reinterpret_cast<const gr_udp_header *>(reinterpret_cast<const u_char *>(ih) + ip_len);
|
||||
|
||||
// convert from network byte order to host byte order
|
||||
//u_short sport;
|
||||
// u_short sport;
|
||||
u_short dport;
|
||||
dport = ntohs(uh->dport);
|
||||
//sport = ntohs(uh->sport);
|
||||
// sport = ntohs(uh->sport);
|
||||
if (dport == d_udp_port)
|
||||
{
|
||||
// print ip addresses and udp ports
|
||||
@@ -319,7 +319,7 @@ void Gr_Complex_Ip_Packet_Source::my_pcap_loop_thread(pcap_t *pcap_handle)
|
||||
}
|
||||
|
||||
|
||||
void Gr_Complex_Ip_Packet_Source::demux_samples(const gr_vector_void_star& output_items, int num_samples_readed)
|
||||
void Gr_Complex_Ip_Packet_Source::demux_samples(const gr_vector_void_star &output_items, int num_samples_readed)
|
||||
{
|
||||
int8_t real;
|
||||
int8_t imag;
|
||||
|
||||
@@ -147,7 +147,7 @@ void labsat23_source::decode_samples_one_channel(int16_t input_short, gr_complex
|
||||
// bits per sample, 4 samples per int16
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
//out[i] = gr_complex(0.0, 0.0);
|
||||
// out[i] = gr_complex(0.0, 0.0);
|
||||
// In-Phase
|
||||
if (bs[15 - 4 * i])
|
||||
{
|
||||
@@ -195,7 +195,7 @@ void labsat23_source::decode_samples_one_channel(int16_t input_short, gr_complex
|
||||
out[i] += gr_complex(0, 1);
|
||||
}
|
||||
}
|
||||
//out[i] += gr_complex(0.5, 0.5);
|
||||
// out[i] += gr_complex(0.5, 0.5);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -273,8 +273,8 @@ int labsat23_source::general_work(int noutput_items,
|
||||
uint8_t section_id = static_cast<int>(memblock[byte_counter]) + static_cast<int>(memblock[byte_counter + 1]) * 256;
|
||||
byte_counter += 2;
|
||||
|
||||
//uint8_t section_lenght_bytes = 0;
|
||||
//section_lenght_bytes += memblock[byte_counter] | (memblock[byte_counter + 1] << 8) | (memblock[byte_counter + 2] << 16) | (memblock[byte_counter + 3] << 24);
|
||||
// uint8_t section_lenght_bytes = 0;
|
||||
// section_lenght_bytes += memblock[byte_counter] | (memblock[byte_counter + 1] << 8) | (memblock[byte_counter + 2] << 16) | (memblock[byte_counter + 3] << 24);
|
||||
|
||||
byte_counter += 4;
|
||||
if (section_id == 2)
|
||||
@@ -343,7 +343,7 @@ int labsat23_source::general_work(int noutput_items,
|
||||
return -1;
|
||||
}
|
||||
|
||||
//todo: Add support for dual channel files
|
||||
// todo: Add support for dual channel files
|
||||
if (d_channel_selector == 0)
|
||||
{
|
||||
std::cout << "ERROR: Labsat file contains more than one channel and it is not currently supported by Labsat signal source." << std::endl;
|
||||
@@ -422,7 +422,7 @@ int labsat23_source::general_work(int noutput_items,
|
||||
{
|
||||
case 0:
|
||||
// dual channel 2 bits per complex sample
|
||||
//todo: implement dual channel reader
|
||||
// todo: implement dual channel reader
|
||||
break;
|
||||
default:
|
||||
// single channel 2 bits per complex sample (1 bit I + 1 bit Q, 8 samples per int16)
|
||||
@@ -480,7 +480,7 @@ int labsat23_source::general_work(int noutput_items,
|
||||
{
|
||||
case 0:
|
||||
// dual channel
|
||||
//todo: implement dual channel reader
|
||||
// todo: implement dual channel reader
|
||||
break;
|
||||
default:
|
||||
// single channel 4 bits per complex sample (2 bit I + 2 bit Q, 4 samples per int16)
|
||||
|
||||
@@ -69,11 +69,11 @@ int unpack_byte_2bit_cpx_samples::work(int noutput_items,
|
||||
for (int i = 0; i < noutput_items / 4; i++)
|
||||
{
|
||||
// Read packed input sample (1 byte = 2 complex samples)
|
||||
//* Packing Order
|
||||
//* Most Significant Nibble - Sample n
|
||||
//* Least Significant Nibble - Sample n+1
|
||||
//* Packing order in Nibble Q1 Q0 I1 I0
|
||||
//normal
|
||||
// * Packing Order
|
||||
// * Most Significant Nibble - Sample n
|
||||
// * Least Significant Nibble - Sample n+1
|
||||
// * Packing order in Nibble Q1 Q0 I1 I0
|
||||
// normal
|
||||
// int8_t c = in[i];
|
||||
// //Q[n]
|
||||
// sample.two_bit_sample = (c>>6) & 3;
|
||||
@@ -88,18 +88,18 @@ int unpack_byte_2bit_cpx_samples::work(int noutput_items,
|
||||
// sample.two_bit_sample = c & 3;
|
||||
// out[n++] = (2*(int16_t)sample.two_bit_sample+1);
|
||||
|
||||
//I/Q swap
|
||||
// I/Q swap
|
||||
int8_t c = in[i];
|
||||
//I[n]
|
||||
// I[n]
|
||||
sample.two_bit_sample = (c >> 4) & 3;
|
||||
out[n++] = (2 * static_cast<int16_t>(sample.two_bit_sample) + 1);
|
||||
//Q[n]
|
||||
// Q[n]
|
||||
sample.two_bit_sample = (c >> 6) & 3;
|
||||
out[n++] = (2 * static_cast<int16_t>(sample.two_bit_sample) + 1);
|
||||
//I[n+1]
|
||||
// I[n+1]
|
||||
sample.two_bit_sample = c & 3;
|
||||
out[n++] = (2 * static_cast<int16_t>(sample.two_bit_sample) + 1);
|
||||
//Q[n+1]
|
||||
// Q[n+1]
|
||||
sample.two_bit_sample = (c >> 2) & 3;
|
||||
out[n++] = (2 * static_cast<int16_t>(sample.two_bit_sample) + 1);
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ void unpack_spir_gss6450_samples::decode_4bits_word(uint32_t input_uint32, gr_co
|
||||
switch (adc_bits)
|
||||
{
|
||||
case 2:
|
||||
//four bits per complex sample (2 I + 2 Q), 8 samples per int32[s0,s1,s2,s3,s4,s5,s6,s7]
|
||||
// four bits per complex sample (2 I + 2 Q), 8 samples per int32[s0,s1,s2,s3,s4,s5,s6,s7]
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
tmp_char = input_uint32 & 3;
|
||||
@@ -86,7 +86,7 @@ void unpack_spir_gss6450_samples::decode_4bits_word(uint32_t input_uint32, gr_co
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
//eight bits per complex sample (4 I + 4 Q), 4 samples per int32= [s0,s1,s2,s3]
|
||||
// eight bits per complex sample (4 I + 4 Q), 4 samples per int32= [s0,s1,s2,s3]
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
tmp_char = input_uint32 & 0x0F;
|
||||
|
||||
Reference in New Issue
Block a user