Add NoUpdateReason of NotAvailable, driven by ProductNotAvailable

This commit is contained in:
Dan Paulat 2025-08-30 18:24:50 -05:00
parent 449d8cb796
commit a306fb4363
8 changed files with 49 additions and 16 deletions

View file

@ -121,9 +121,12 @@ void Level3RasterView::ComputeSweep()
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, std::ignore) =
types::RadarProductLoadStatus loadStatus {};
std::tie(message, foundTime, loadStatus) =
radarProductManager->GetLevel3Data(GetRadarProductName(), requestedTime);
set_load_status(loadStatus);
// If a different time was found than what was requested, update it
if (requestedTime != foundTime)
{
@ -133,7 +136,10 @@ void Level3RasterView::ComputeSweep()
if (message == nullptr)
{
logger_->debug("Level 3 data not found");
Q_EMIT SweepNotComputed(types::NoUpdateReason::NotLoaded);
Q_EMIT SweepNotComputed(
loadStatus == types::RadarProductLoadStatus::ProductNotAvailable ?
types::NoUpdateReason::NotAvailable :
types::NoUpdateReason::NotLoaded);
return;
}