Skip to content

Commit

Permalink
Add "All" location type for audio alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
dpaulat committed May 9, 2024
1 parent 886c92a commit 075d65a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions scwx-qt/source/scwx/qt/manager/alert_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,11 @@ void AlertManager::Impl::HandleAlert(const types::TextEventKey& key,
continue;
}

bool activeAtLocation = false;
bool activeAtLocation = (locationMethod == types::LocationMethod::All);

if (locationMethod == types::LocationMethod::Fixed ||
locationMethod == types::LocationMethod::Track)
{

// Determine if the alert is active at the current coordinte
auto alertCoordinates = segment->codedLocation_->coordinates();

Expand Down
1 change: 1 addition & 0 deletions scwx-qt/source/scwx/qt/types/location_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ static const std::unordered_map<LocationMethod, std::string>
locationMethodName_ {{LocationMethod::Fixed, "Fixed"},
{LocationMethod::Track, "Track"},
{LocationMethod::County, "County"},
{LocationMethod::All, "All"},
{LocationMethod::Unknown, "?"}};

SCWX_GET_ENUM(LocationMethod, GetLocationMethod, locationMethodName_)
Expand Down
3 changes: 2 additions & 1 deletion scwx-qt/source/scwx/qt/types/location_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ enum class LocationMethod
Fixed,
Track,
County,
All,
Unknown
};
typedef scwx::util::
Iterator<LocationMethod, LocationMethod::Fixed, LocationMethod::County>
Iterator<LocationMethod, LocationMethod::Fixed, LocationMethod::All>
LocationMethodIterator;

LocationMethod GetLocationMethod(const std::string& name);
Expand Down

0 comments on commit 075d65a

Please sign in to comment.