mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 03:40:05 +00:00 
			
		
		
		
	switch level2 incoming elevation to optional
This commit is contained in:
		
							parent
							
								
									f481d57ed1
								
							
						
					
					
						commit
						e10ebdeb5e
					
				
					 9 changed files with 41 additions and 32 deletions
				
			
		|  | @ -272,8 +272,7 @@ public: | |||
|    common::Level3ProductCategoryMap availableCategoryMap_ {}; | ||||
|    std::shared_mutex                availableCategoryMutex_ {}; | ||||
| 
 | ||||
|    float incomingLevel2Elevation_ { | ||||
|       provider::AwsLevel2ChunksDataProvider::INVALID_ELEVATION}; | ||||
|    std::optional<float> incomingLevel2Elevation_ {}; | ||||
| 
 | ||||
|    std::unordered_map<boost::uuids::uuid, | ||||
|                       std::shared_ptr<ProviderManager>, | ||||
|  | @ -454,7 +453,7 @@ float RadarProductManager::gate_size() const | |||
|    return (is_tdwr()) ? 150.0f : 250.0f; | ||||
| } | ||||
| 
 | ||||
| float RadarProductManager::incoming_level_2_elevation() const | ||||
| std::optional<float> RadarProductManager::incoming_level_2_elevation() const | ||||
| { | ||||
|    return p->incomingLevel2Elevation_; | ||||
| } | ||||
|  | @ -1552,7 +1551,7 @@ RadarProductManager::GetLevel2Data(wsr88d::rda::DataBlockType dataBlockType, | |||
|             scwx::util::TimePoint(radarData0->modified_julian_date(), | ||||
|                                   radarData0->collection_time())); | ||||
| 
 | ||||
|          const float incomingElevation = | ||||
|          const std::optional<float> incomingElevation = | ||||
|             std::dynamic_pointer_cast<provider::AwsLevel2ChunksDataProvider>( | ||||
|                p->level2ChunksProviderManager_->provider_) | ||||
|                ->GetCurrentElevation(); | ||||
|  | @ -1597,14 +1596,11 @@ RadarProductManager::GetLevel2Data(wsr88d::rda::DataBlockType dataBlockType, | |||
|                   elevationCuts = std::move(recordElevationCuts); | ||||
|                   foundTime     = collectionTime; | ||||
| 
 | ||||
|                   if (p->incomingLevel2Elevation_ != | ||||
|                       provider::AwsLevel2ChunksDataProvider::INVALID_ELEVATION) | ||||
|                   if (!p->incomingLevel2Elevation_.has_value()) | ||||
|                   { | ||||
|                      p->incomingLevel2Elevation_ = provider:: | ||||
|                         AwsLevel2ChunksDataProvider::INVALID_ELEVATION; | ||||
|                      p->incomingLevel2Elevation_ = {}; | ||||
|                      Q_EMIT IncomingLevel2ElevationChanged( | ||||
|                         provider::AwsLevel2ChunksDataProvider:: | ||||
|                            INVALID_ELEVATION); | ||||
|                         p->incomingLevel2Elevation_); | ||||
|                   } | ||||
|                } | ||||
|             } | ||||
|  |  | |||
|  | @ -45,9 +45,9 @@ public: | |||
|    coordinates(common::RadialSize radialSize, bool smoothingEnabled) const; | ||||
|    [[nodiscard]] const scwx::util::time_zone* default_time_zone() const; | ||||
|    [[nodiscard]] float                        gate_size() const; | ||||
|    [[nodiscard]] float       incoming_level_2_elevation() const; | ||||
|    [[nodiscard]] bool        is_tdwr() const; | ||||
|    [[nodiscard]] std::string radar_id() const; | ||||
|    [[nodiscard]] std::optional<float> incoming_level_2_elevation() const; | ||||
|    [[nodiscard]] bool                 is_tdwr() const; | ||||
|    [[nodiscard]] std::string          radar_id() const; | ||||
|    [[nodiscard]] std::shared_ptr<config::RadarSite> radar_site() const; | ||||
| 
 | ||||
|    void Initialize(); | ||||
|  | @ -149,7 +149,7 @@ signals: | |||
|    void NewDataAvailable(common::RadarProductGroup             group, | ||||
|                          const std::string&                    product, | ||||
|                          std::chrono::system_clock::time_point latestTime); | ||||
|    void IncomingLevel2ElevationChanged(float incomingElevation); | ||||
|    void IncomingLevel2ElevationChanged(std::optional<float> incomingElevation); | ||||
| 
 | ||||
| private: | ||||
|    std::unique_ptr<RadarProductManagerImpl> p; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 AdenKoperczak
						AdenKoperczak