mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-30 23:40:06 +00:00 
			
		
		
		
	Add "All" location type for audio alerts
This commit is contained in:
		
							parent
							
								
									886c92a485
								
							
						
					
					
						commit
						075d65a535
					
				
					 3 changed files with 4 additions and 3 deletions
				
			
		|  | @ -132,12 +132,11 @@ void AlertManager::Impl::HandleAlert(const types::TextEventKey& key, | ||||||
|          continue; |          continue; | ||||||
|       } |       } | ||||||
| 
 | 
 | ||||||
|       bool activeAtLocation = false; |       bool activeAtLocation = (locationMethod == types::LocationMethod::All); | ||||||
| 
 | 
 | ||||||
|       if (locationMethod == types::LocationMethod::Fixed || |       if (locationMethod == types::LocationMethod::Fixed || | ||||||
|           locationMethod == types::LocationMethod::Track) |           locationMethod == types::LocationMethod::Track) | ||||||
|       { |       { | ||||||
| 
 |  | ||||||
|          // Determine if the alert is active at the current coordinte
 |          // Determine if the alert is active at the current coordinte
 | ||||||
|          auto alertCoordinates = segment->codedLocation_->coordinates(); |          auto alertCoordinates = segment->codedLocation_->coordinates(); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -16,6 +16,7 @@ static const std::unordered_map<LocationMethod, std::string> | ||||||
|    locationMethodName_ {{LocationMethod::Fixed, "Fixed"}, |    locationMethodName_ {{LocationMethod::Fixed, "Fixed"}, | ||||||
|                         {LocationMethod::Track, "Track"}, |                         {LocationMethod::Track, "Track"}, | ||||||
|                         {LocationMethod::County, "County"}, |                         {LocationMethod::County, "County"}, | ||||||
|  |                         {LocationMethod::All, "All"}, | ||||||
|                         {LocationMethod::Unknown, "?"}}; |                         {LocationMethod::Unknown, "?"}}; | ||||||
| 
 | 
 | ||||||
| SCWX_GET_ENUM(LocationMethod, GetLocationMethod, locationMethodName_) | SCWX_GET_ENUM(LocationMethod, GetLocationMethod, locationMethodName_) | ||||||
|  |  | ||||||
|  | @ -16,10 +16,11 @@ enum class LocationMethod | ||||||
|    Fixed, |    Fixed, | ||||||
|    Track, |    Track, | ||||||
|    County, |    County, | ||||||
|  |    All, | ||||||
|    Unknown |    Unknown | ||||||
| }; | }; | ||||||
| typedef scwx::util:: | typedef scwx::util:: | ||||||
|    Iterator<LocationMethod, LocationMethod::Fixed, LocationMethod::County> |    Iterator<LocationMethod, LocationMethod::Fixed, LocationMethod::All> | ||||||
|       LocationMethodIterator; |       LocationMethodIterator; | ||||||
| 
 | 
 | ||||||
| LocationMethod     GetLocationMethod(const std::string& name); | LocationMethod     GetLocationMethod(const std::string& name); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat