mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 12:30:04 +00:00 
			
		
		
		
	added inital radar site based alerts (only default radar site)
This commit is contained in:
		
							parent
							
								
									2bc971eb94
								
							
						
					
					
						commit
						dea53bddb4
					
				
					 7 changed files with 197 additions and 128 deletions
				
			
		|  | @ -37,12 +37,16 @@ public: | |||
|       alertLocationMethod_.SetDefault(defaultAlertLocationMethodValue); | ||||
|       alertLatitude_.SetDefault(0.0); | ||||
|       alertLongitude_.SetDefault(0.0); | ||||
|       alertRadius_.SetDefault(0.0); | ||||
|       ignoreMissingCodecs_.SetDefault(false); | ||||
| 
 | ||||
|       alertLatitude_.SetMinimum(-90.0); | ||||
|       alertLatitude_.SetMaximum(90.0); | ||||
|       alertLongitude_.SetMinimum(-180.0); | ||||
|       alertLongitude_.SetMaximum(180.0); | ||||
|       alertRadius_.SetMinimum(0.0); | ||||
|       alertRadius_.SetMaximum(9999999999); | ||||
| 
 | ||||
| 
 | ||||
|       alertLocationMethod_.SetValidator( | ||||
|          SCWX_SETTINGS_ENUM_VALIDATOR(types::LocationMethod, | ||||
|  | @ -86,6 +90,7 @@ public: | |||
|    SettingsVariable<std::string> alertLocationMethod_ {"alert_location_method"}; | ||||
|    SettingsVariable<double>      alertLatitude_ {"alert_latitude"}; | ||||
|    SettingsVariable<double>      alertLongitude_ {"alert_longitude"}; | ||||
|    SettingsVariable<double>      alertRadius_ {"alert_radius"}; | ||||
|    SettingsVariable<std::string> alertCounty_ {"alert_county"}; | ||||
|    SettingsVariable<bool>        ignoreMissingCodecs_ {"ignore_missing_codecs"}; | ||||
| 
 | ||||
|  | @ -101,6 +106,7 @@ AudioSettings::AudioSettings() : | |||
|                       &p->alertLocationMethod_, | ||||
|                       &p->alertLatitude_, | ||||
|                       &p->alertLongitude_, | ||||
|                       &p->alertRadius_, | ||||
|                       &p->alertCounty_, | ||||
|                       &p->ignoreMissingCodecs_}); | ||||
|    RegisterVariables(p->variables_); | ||||
|  | @ -133,6 +139,11 @@ SettingsVariable<double>& AudioSettings::alert_longitude() const | |||
|    return p->alertLongitude_; | ||||
| } | ||||
| 
 | ||||
| SettingsVariable<double>& AudioSettings::alert_radius() const | ||||
| { | ||||
|    return p->alertRadius_; | ||||
| } | ||||
| 
 | ||||
| SettingsVariable<std::string>& AudioSettings::alert_county() const | ||||
| { | ||||
|    return p->alertCounty_; | ||||
|  | @ -166,6 +177,7 @@ bool operator==(const AudioSettings& lhs, const AudioSettings& rhs) | |||
|            lhs.p->alertLocationMethod_ == rhs.p->alertLocationMethod_ && | ||||
|            lhs.p->alertLatitude_ == rhs.p->alertLatitude_ && | ||||
|            lhs.p->alertLongitude_ == rhs.p->alertLongitude_ && | ||||
|            lhs.p->alertRadius_ == rhs.p->alertRadius_ && | ||||
|            lhs.p->alertCounty_ == rhs.p->alertCounty_ && | ||||
|            lhs.p->alertEnabled_ == rhs.p->alertEnabled_); | ||||
| } | ||||
|  |  | |||
|  | @ -30,6 +30,7 @@ public: | |||
|    SettingsVariable<std::string>& alert_location_method() const; | ||||
|    SettingsVariable<double>&      alert_latitude() const; | ||||
|    SettingsVariable<double>&      alert_longitude() const; | ||||
|    SettingsVariable<double>&      alert_radius() const; | ||||
|    SettingsVariable<std::string>& alert_county() const; | ||||
|    SettingsVariable<bool>& alert_enabled(awips::Phenomenon phenomenon) const; | ||||
|    SettingsVariable<bool>& ignore_missing_codecs() const; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 AdenKoperczak
						AdenKoperczak