1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-16 04:05:46 +00:00

Smoother transition when reading a sequence of files

From:
End of current file, reading the next Labsat file in sequence: /Users/carlesfernandez/Downloads/time/output/output_0000.LS3
Labsat file source is reading samples from /Users/carlesfernandez/Downloads/time/output/output_0001.LS3
Warning

To:
End of current file, reading the next Labsat file in sequence: /Users/carlesfernandez/Downloads/time/output/output_0001.LS3
Labsat file source is reading samples from /Users/carlesfernandez/Downloads/time/output/output_0001.LS3
This commit is contained in:
Carles Fernandez 2019-05-10 15:05:35 +02:00
parent 6a6ec19b63
commit e574c55ca9
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -442,16 +442,17 @@ int labsat23_source::general_work(int noutput_items,
}
// trigger the read of the next file in the sequence
d_current_file_number++;
if (d_labsat_version == 3)
{
std::cout << "End of current file, reading the next Labsat file in sequence: " << generate_filename() << std::endl;
}
d_current_file_number++;
binary_input_file->close();
binary_input_file->open(generate_filename().c_str(), std::ios::in | std::ios::binary);
if (binary_input_file->is_open())
{
std::cout << "Labsat file source is reading samples from " << generate_filename() << std::endl;
return 0;
}
else
{
@ -504,16 +505,17 @@ int labsat23_source::general_work(int noutput_items,
}
// trigger the read of the next file in the sequence
d_current_file_number++;
if (d_labsat_version == 3)
{
std::cout << "End of current file, reading the next Labsat file in sequence: " << generate_filename() << std::endl;
}
d_current_file_number++;
binary_input_file->close();
binary_input_file->open(generate_filename().c_str(), std::ios::in | std::ios::binary);
if (binary_input_file->is_open())
{
std::cout << "Labsat file source is reading samples from " << generate_filename() << std::endl;
return 0;
}
else
{