Skip to content

Commit

Permalink
fixed TSAT colorisation
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoKle committed Oct 23, 2022
1 parent 125b13a commit 4aa2893
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vACDM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ COLORREF vACDM::colorizeTsatandAsrt(const types::Flight_t& flight) const {
{
return grey;
}
const auto minutes = std::chrono::duration_cast<std::chrono::minutes>(std::chrono::utc_clock::now() - flight.tsat).count();
if (minutes <= 5 && minutes >= -5)
const auto timeSinceTsat = std::chrono::duration_cast<std::chrono::minutes>(std::chrono::utc_clock::now() - flight.tsat).count();
if (timeSinceTsat <= 5 && timeSinceTsat >= -5)
{
/* CTOT not used atm
if (flight.ctot != types::defaultTime)
Expand All @@ -241,7 +241,7 @@ COLORREF vACDM::colorizeTsatandAsrt(const types::Flight_t& flight) const {
return green;
}
// TSAT earlier than 5+ min
if (minutes > 5)
if (timeSinceTsat < -5)
{
/*
if (flight.ctot != types::defaultTime)
Expand All @@ -252,7 +252,7 @@ COLORREF vACDM::colorizeTsatandAsrt(const types::Flight_t& flight) const {
return lightgreen;
}
// TSAT passed by 5+ min
if (minutes < -5)
if (timeSinceTsat > 5)
{
/*
if (flight.ctot != types::defaultTime)
Expand Down

0 comments on commit 4aa2893

Please sign in to comment.