mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 01:30:05 +00:00 
			
		
		
		
	Changed Radar Site mode to use its own selection (+default/follow)
This commit is contained in:
		
							parent
							
								
									146055fb99
								
							
						
					
					
						commit
						f7abda15c8
					
				
					 5 changed files with 228 additions and 92 deletions
				
			
		|  | @ -106,16 +106,23 @@ common::Coordinate AlertManager::Impl::CurrentCoordinate( | |||
|    } | ||||
|    else if (locationMethod == types::LocationMethod::RadarSite) | ||||
|    { | ||||
|       std::string radarSiteSelection = | ||||
|          audioSettings.alert_radar_site().GetValue(); | ||||
|       std::shared_ptr<config::RadarSite> radarSite; | ||||
|       if (radarSite_ == nullptr) | ||||
|       if (radarSiteSelection == "default") | ||||
|       { | ||||
|          std::string siteId = | ||||
|             settings::GeneralSettings::Instance().default_radar_site().GetValue(); | ||||
|          std::string siteId = settings::GeneralSettings::Instance() | ||||
|                                  .default_radar_site() | ||||
|                                  .GetValue(); | ||||
|          radarSite = config::RadarSite::Get(siteId); | ||||
|       } | ||||
|       else if (radarSiteSelection == "follow") | ||||
|       { | ||||
|          radarSite = radarSite_; | ||||
|       } | ||||
|       else | ||||
|       { | ||||
|          radarSite = radarSite_; | ||||
|          radarSite = config::RadarSite::Get(radarSiteSelection); | ||||
|       } | ||||
| 
 | ||||
|       if (radarSite != nullptr) | ||||
|  | @ -145,8 +152,6 @@ void AlertManager::Impl::HandleAlert(const types::TextEventKey& key, | |||
|    auto               alertRadius = units::length::kilometers<double>( | ||||
|       audioSettings.alert_radius().GetValue()); | ||||
| 
 | ||||
|    logger_->debug("alertRadius: {}", (double)alertRadius); | ||||
| 
 | ||||
|    auto message = textEventManager_->message_list(key).at(messageIndex); | ||||
| 
 | ||||
|    for (auto& segment : message->segments()) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 AdenKoperczak
						AdenKoperczak