From cb6149ef9c745b12e103c681f233902f4dff00f4 Mon Sep 17 00:00:00 2001 From: Leon Kleinschmidt <101114069+LeoKle@users.noreply.github.com> Date: Thu, 18 Apr 2024 10:40:12 +0200 Subject: [PATCH] v1.3.1 (#44) * fix ECFMP measures not displaying * fix EXOT colorization * bump version to 1.3.1 --- CMakeLists.txt | 2 +- src/core/TagItems.h | 11 ++++++++--- src/core/TagItemsColor.h | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 08f6d46..c02c265 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.14) -PROJECT(vACDM VERSION "1.3.0") +PROJECT(vACDM VERSION "1.3.1") SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON) SET(CMAKE_CXX_STANDARD 20) SET(CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/src/core/TagItems.h b/src/core/TagItems.h index 47caa44..5ce67c6 100644 --- a/src/core/TagItems.h +++ b/src/core/TagItems.h @@ -92,7 +92,7 @@ void displayTagItem(EuroScopePlugIn::CFlightPlan FlightPlan, EuroScopePlugIn::CR case itemType::EXOT: if (pilot.exot.time_since_epoch().count() > 0) { outputText << std::format("{:%M}", pilot.exot); - *pRGB = Color::colorizeExot(pilot); + *pColorCode = Color::colorizeExot(pilot); } break; case itemType::ASAT: @@ -120,8 +120,13 @@ void displayTagItem(EuroScopePlugIn::CFlightPlan FlightPlan, EuroScopePlugIn::CR *pRGB = Color::colorizeCtot(pilot); break; case itemType::ECFMP_MEASURES: - outputText << ""; - *pRGB = Color::colorizeEcfmpMeasure(pilot); + if (false == pilot.measures.empty()) { + const std::int64_t measureMinutes = pilot.measures[0].value / 60; + const std::int64_t measureSeconds = pilot.measures[0].value % 60; + + outputText << std::format("{:02}:{:02}", measureMinutes, measureSeconds); + *pRGB = Color::colorizeEcfmpMeasure(pilot); + } break; case itemType::EVENT_BOOKING: outputText << (pilot.hasBooking ? "B" : ""); diff --git a/src/core/TagItemsColor.h b/src/core/TagItemsColor.h index e404f6b..7858afd 100644 --- a/src/core/TagItemsColor.h +++ b/src/core/TagItemsColor.h @@ -97,7 +97,7 @@ class Color { return pluginConfig.debug; } - static COLORREF colorizeExot(const types::Pilot &pilot) { + static int colorizeExot(const types::Pilot &pilot) { std::ignore = pilot; return EuroScopePlugIn::TAG_COLOR_DEFAULT; }