mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-18 21:23:02 +00:00
Fix message typos, improve messages, clean code
This commit is contained in:
parent
f959428321
commit
da5e21a5b1
@ -198,6 +198,8 @@ void labsat23_source::decode_samples_one_channel(int16_t input_short, gr_complex
|
||||
//out[i] += gr_complex(0.5, 0.5);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -225,7 +227,6 @@ int labsat23_source::general_work(int noutput_items,
|
||||
{
|
||||
preamble_ok = false;
|
||||
}
|
||||
//std::cout << "H[" << i << "]:" << (int)memblock[byte_counter] << std::endl;
|
||||
byte_counter++;
|
||||
}
|
||||
|
||||
@ -266,17 +267,14 @@ int labsat23_source::general_work(int noutput_items,
|
||||
header_bytes += memblock[byte_counter] | (memblock[byte_counter + 1] << 8) | (memblock[byte_counter + 2] << 16) | (memblock[byte_counter + 3] << 24);
|
||||
|
||||
byte_counter += 4;
|
||||
//std::cout << "header_bytes=" << header_bytes << std::endl;
|
||||
|
||||
// read first section
|
||||
// section ID (little-endian)
|
||||
uint8_t section_id = static_cast<int>(memblock[byte_counter]) + static_cast<int>(memblock[byte_counter + 1]) * 256;
|
||||
//std::cout << "Section ID: " << (int)section_id << std::endl;
|
||||
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);
|
||||
//std::cout << "section_lenght_bytes=" << (int)section_lenght_bytes << std::endl;
|
||||
|
||||
byte_counter += 4;
|
||||
if (section_id == 2)
|
||||
@ -285,10 +283,10 @@ int labsat23_source::general_work(int noutput_items,
|
||||
switch (d_ref_clock)
|
||||
{
|
||||
case 0:
|
||||
std::cout << "Labsat reference clock: internal OXCO" << std::endl;
|
||||
std::cout << "Labsat reference clock: internal OCXO" << std::endl;
|
||||
break;
|
||||
case 1:
|
||||
std::cout << "Labsat reference clock: internal TXCO" << std::endl;
|
||||
std::cout << "Labsat reference clock: internal TCXO" << std::endl;
|
||||
break;
|
||||
case 2:
|
||||
std::cout << "Labsat reference clock: external 10 MHz" << std::endl;
|
||||
@ -319,19 +317,19 @@ int labsat23_source::general_work(int noutput_items,
|
||||
switch (d_channel_selector)
|
||||
{
|
||||
case 0:
|
||||
std::cout << "Available channels: Channel A + B, 1 bit quantisation" << std::endl;
|
||||
std::cout << "Available channels: Channel A + B, 1 bit quantisation (I & Q)" << std::endl;
|
||||
break;
|
||||
case 1:
|
||||
std::cout << "Available channels: Channel A, 1 bit quantisation" << std::endl;
|
||||
std::cout << "Available channels: Channel A, 1 bit quantisation (I & Q)" << std::endl;
|
||||
break;
|
||||
case 2:
|
||||
std::cout << "Available channels: Channel B, 1 bit quantisation" << std::endl;
|
||||
std::cout << "Available channels: Channel B, 1 bit quantisation (I & Q)" << std::endl;
|
||||
break;
|
||||
case 3:
|
||||
std::cout << "Available channels: Channel A, 2 bit quantisation" << std::endl;
|
||||
std::cout << "Available channels: Channel A, 2 bit quantisation (I & Q)" << std::endl;
|
||||
break;
|
||||
case 4:
|
||||
std::cout << "Available channels: Channel B, 2 bit quantisation" << std::endl;
|
||||
std::cout << "Available channels: Channel B, 2 bit quantisation (I & Q)" << std::endl;
|
||||
break;
|
||||
default:
|
||||
std::cout << "Unknown channel selection ID " << static_cast<int>(d_channel_selector) << std::endl;
|
||||
@ -420,7 +418,6 @@ int labsat23_source::general_work(int noutput_items,
|
||||
switch (d_bits_per_sample)
|
||||
{
|
||||
case 2:
|
||||
{
|
||||
switch (d_channel_selector)
|
||||
{
|
||||
case 0:
|
||||
@ -479,11 +476,9 @@ int labsat23_source::general_work(int noutput_items,
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
switch (d_channel_selector)
|
||||
{
|
||||
case 0:
|
||||
@ -497,7 +492,7 @@ int labsat23_source::general_work(int noutput_items,
|
||||
{
|
||||
int16_t memblock[n_int16_to_read];
|
||||
binary_input_file->read(reinterpret_cast<char *>(memblock), n_int16_to_read * 2);
|
||||
n_int16_to_read = binary_input_file->gcount() / 2; //from bytes to int16
|
||||
n_int16_to_read = binary_input_file->gcount() / 2; // from bytes to int16
|
||||
if (n_int16_to_read > 0)
|
||||
{
|
||||
int output_pointer = 0;
|
||||
@ -544,12 +539,9 @@ int labsat23_source::general_work(int noutput_items,
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << "Warning!!" << std::endl;
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user