Skip to content

Commit

Permalink
[TASK] do not show controllers without primary frequency (#144)
Browse files Browse the repository at this point in the history
Fixes: #129
  • Loading branch information
jonaseberle committed Jul 25, 2022
1 parent 62b59a0 commit 9872ccb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions src/Controller.cpp
Expand Up @@ -240,3 +240,12 @@ bool Controller::matches(const QRegExp& regex) const {
if (sector->name.contains(regex)) return true;
return MapObject::matches(regex);
}

bool Controller::isObserver() const {
return facilityType == 0;
}

bool Controller::isATC() const {
// 199.998 gets transmitted on VATSIM for a controller without prim freq
return facilityType > 0 && frequency != "199.998";
}
4 changes: 2 additions & 2 deletions src/Controller.h
Expand Up @@ -27,8 +27,8 @@ class Controller: public Client {
QString mapLabel() const;
bool matches(const QRegExp& regex) const;

bool isObserver() const { return facilityType == 0; }
bool isATC() const { return facilityType > 0; } // facilityType = 1 is reported for FSS stations (at least from VATSIM)
bool isObserver() const;
bool isATC() const; // facilityType = 1 is reported for FSS stations (at least from VATSIM)
QString rank() const;

QString getCenter() const;
Expand Down

0 comments on commit 9872ccb

Please sign in to comment.