Skip to content

Commit

Permalink
added color "lightyellow"
Browse files Browse the repository at this point in the history
expanded colorizeEobtAndTobt function
  • Loading branch information
LeoKle committed Mar 6, 2023
1 parent 90053d2 commit 7bb7560
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 2 additions & 0 deletions config/FileFormat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ bool FileFormat::parse(const std::string& filename, SystemConfig& config) {
parsed = this->parseColor(entry[1], config.green, lineOffset);
} else if ("COLOR_blue" == entry[0]) {
parsed = this->parseColor(entry[1], config.blue, lineOffset);
} else if ("COLOR_lightyellow" == entry[0]) {
parsed = this->parseColor(entry[1], config.lightyellow, lineOffset);
} else if ("COLOR_yellow" == entry[0]) {
parsed = this->parseColor(entry[1], config.yellow, lineOffset);
} else if ("COLOR_orange" == entry[0]) {
Expand Down
1 change: 1 addition & 0 deletions types/SystemConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ namespace vacdm {
COLORREF lightblue = RGB(53, 218, 235);
COLORREF green = RGB(0, 181, 27);
COLORREF blue = RGB(0, 0, 255);
COLORREF lightyellow = RGB(255, 255, 191);
COLORREF yellow = RGB(255, 255, 0);
COLORREF orange = RGB(255, 153, 0);
COLORREF red = RGB(255, 0, 0);
Expand Down
13 changes: 9 additions & 4 deletions vACDM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,12 @@ COLORREF vACDM::colorizeEobtAndTobt(const types::Flight_t& flight) const {
{
return this->m_pluginConfig.orange;
}
// tobt is not confirmed
if (flight.tobt_state != "CONFIRMED")
// Diff TOBT TSAT >= 5min && unconfirmed
if (diffTsatTobt >= 5 * 60 && (flight.tobt_state == "GUESS" || flight.tobt_state == "FLIGHTPLAN"))
{
return this->m_pluginConfig.lightgreen;
return this->m_pluginConfig.lightyellow;
}
// Diff TOBT TSAT >= 5min
// Diff TOBT TSAT >= 5min && confirmed
if (diffTsatTobt >= 5 * 60 && flight.tobt_state == "CONFIRMED")
{
return this->m_pluginConfig.yellow;
Expand All @@ -258,6 +258,11 @@ COLORREF vACDM::colorizeEobtAndTobt(const types::Flight_t& flight) const {
{
return this->m_pluginConfig.green;
}
// tobt is not confirmed
if (flight.tobt_state != "CONFIRMED")
{
return this->m_pluginConfig.lightgreen;
}
return this->m_pluginConfig.debug;
}

Expand Down

0 comments on commit 7bb7560

Please sign in to comment.