Fix reload of expired (garbage collected) live data

This commit is contained in:
Dan Paulat 2023-04-11 22:46:11 -05:00
parent 92bb5154a4
commit f1a5d4a744
5 changed files with 70 additions and 19 deletions

View file

@ -97,9 +97,18 @@ void Level3RasterView::ComputeSweep()
radar_product_manager();
// Retrieve message from Radar Product Manager
std::shared_ptr<wsr88d::rpg::Level3Message> message =
radarProductManager->GetLevel3Data(GetRadarProductName(),
selected_time());
std::shared_ptr<wsr88d::rpg::Level3Message> message;
std::chrono::system_clock::time_point requestedTime {selected_time()};
std::chrono::system_clock::time_point foundTime;
std::tie(message, foundTime) =
radarProductManager->GetLevel3Data(GetRadarProductName(), requestedTime);
// If a different time was found than what was requested, update it
if (requestedTime != foundTime)
{
SelectTime(foundTime);
}
if (message == nullptr)
{
logger_->debug("Level 3 data not found");