From bf4693d0a1733559c4fc774ad1a2952df7952d63 Mon Sep 17 00:00:00 2001 From: Phil7789 <87429599+Phil7789@users.noreply.github.com> Date: Tue, 26 May 2026 14:57:48 +0200 Subject: [PATCH 1/4] Update build.yml --- .github/workflows/build.yml | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6595ba2..668fd01 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -57,6 +57,18 @@ jobs: echo "Versions. version = ${{steps.dllversion.outputs.version}}, short_sha = $SHORT_SHA, new_version = $SHA_VERSION" sed -i 's/const std::string pluginVersion = ".*";/const std::string pluginVersion = "'$SHA_VERSION'";/' vSIDPlugin.h + - name: Determine release name + id: releasename + shell: bash + run: | + if [[ "${{ steps.prerelease.outputs.prerelease }}" == 'true' ]]; then + echo "Setting pre-release name" + echo "releasename=v${{ steps.commitversion.outputs.shaversion }}" >> $GITHUB_OUTPUT + else + echo "Setting stable name" + echo "releasename=v${{steps.dllversion.outputs.version}}" >> $GITHUB_OUTPUT + fi + - name: Install LLVM and Clang uses: KyleMayes/install-llvm-action@v2 with: @@ -105,6 +117,18 @@ jobs: # remove --verbose for less verbosity run: cmake --build build --config Release --verbose + - name: Rename PDB and MAP files + shell: pwsh + run: | + $releaseName = "${{ steps.releasename.outputs.releasename }}" + Write-Host "Appending $releaseName to .pdb and .map files..." + + $files = Get-ChildItem -Path "build\Release" -Include *.pdb, *.map -Recurse + foreach ($file in $files) { + $newName = "{0}-{1}{2}" -f $file.BaseName, $releaseName, $file.Extension + Rename-Item -Path $file.FullName -NewName $newName -PassThru + } + - name: Create PDB and MAP artifact uses: actions/upload-artifact@v7 with: @@ -219,19 +243,6 @@ jobs: fi done - - - name: Determine release name - id: releasename - shell: bash - run: | - if [[ "${{ steps.prerelease.outputs.prerelease }}" == 'true' ]]; then - echo "Setting pre-release name" - echo "releasename=v${{ steps.commitversion.outputs.shaversion }}" >> $GITHUB_OUTPUT - else - echo "Setting stable name" - echo "releasename=v${{steps.dllversion.outputs.version}}" >> $GITHUB_OUTPUT - fi - - name: Create GitHub Release and Upload Assets id: create_release uses: softprops/action-gh-release@v2 From 734c48a715cefe2b7096bbecd493903c6f42bd7f Mon Sep 17 00:00:00 2001 From: Phil7789 <87429599+Phil7789@users.noreply.github.com> Date: Tue, 26 May 2026 14:58:11 +0200 Subject: [PATCH 2/4] Update Changelog.txt --- Changelog.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Changelog.txt b/Changelog.txt index eb4068e..7598dc4 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -16,6 +16,12 @@ SID evaluation slightly changed due to the bug fixing of restrictions overruling * CONF - add color values for the handover flag * "hovNeutral" (default: orange) - caution / information color * "hovWarning" (default: red) - warning color +* ATC - FMP stations are skipped in controller detection (#410) +* ATC - if a controller disconnects that was on the list for failed SI determination the callsign will be removed to enable new evaluation upon new connection + +:gear: **Changed Features / Behaviour** +* ATC - after too many tries (10) evaluation for SI is stopped as it probably cannot be matched anymore (not reported by ES / the network and not present in the .ese file) +* GEN - debugging console cannot be closed via the 'X' anymore (as this would also close ES) :lady_beetle: **Fixes** * CONF - fix crash during coordinate conversion while parsing the .ese file for atc stations and vis points From 78aadddb5f072cf5af86513db72c328bf99b702e Mon Sep 17 00:00:00 2001 From: Phil7789 <87429599+Phil7789@users.noreply.github.com> Date: Tue, 26 May 2026 14:58:26 +0200 Subject: [PATCH 3/4] Disable 'X' on console window --- messageHandler.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/messageHandler.cpp b/messageHandler.cpp index 89ae8aa..5f50cff 100644 --- a/messageHandler.cpp +++ b/messageHandler.cpp @@ -95,6 +95,19 @@ void vsid::MessageHandler::openConsole() try { AllocConsole(); + + // disable close button to prevent ES closing + HWND hwnd = GetConsoleWindow(); + if (hwnd != NULL) + { + HMENU hMenu = GetSystemMenu(hwnd, FALSE); + if (hMenu != NULL) + { + DeleteMenu(hMenu, SC_CLOSE, MF_BYCOMMAND); + } + SetWindowTextA(hwnd, "Console Logger"); + } + freopen_s(&this->consoleFile, "CONOUT$", "w", stdout); } catch (std::exception& e) From 93ac962c6fb61f3b7bc7c520c1a3d003a46096af Mon Sep 17 00:00:00 2001 From: Phil7789 <87429599+Phil7789@users.noreply.github.com> Date: Tue, 26 May 2026 14:59:22 +0200 Subject: [PATCH 4/4] Ignore FMP stations (#410) + too many SI tries will stop further evaluation * FSS stations will be ignored if a valid SI is present --- vSIDPlugin.cpp | 65 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 50 insertions(+), 15 deletions(-) diff --git a/vSIDPlugin.cpp b/vSIDPlugin.cpp index dc093f6..647517f 100644 --- a/vSIDPlugin.cpp +++ b/vSIDPlugin.cpp @@ -1831,8 +1831,8 @@ bool vsid::VSIDPlugin::atcFreqMatch(const EuroScopePlugIn::CController& other, c { if (other.GetPrimaryFrequency() != local.freq) { - messageHandler->writeMessage("DEBUG", "[FREQ Match] other: " + std::to_string(other.GetPrimaryFrequency()) + - " is NOT local: " + std::to_string(local.freq), vsid::MessageHandler::DebugArea::Dev); + /*messageHandler->writeMessage("DEBUG", "[FREQ Match] other (" + std::string(other.GetCallsign()) + "): " + std::to_string(other.GetPrimaryFrequency()) + + " is NOT local (section ATC): " + std::to_string(local.freq), vsid::MessageHandler::DebugArea::Dev);*/ return false; } @@ -1877,14 +1877,16 @@ bool vsid::VSIDPlugin::atcFreqMatch(const EuroScopePlugIn::CController& other, c ") IS local: " + myCallsign + "(" + std::to_string(local.freq) + ")", vsid::MessageHandler::DebugArea::Dev); return true; } - else if (other.GetFacility() != local.facility) // #dev - debugging purpose + + if (other.GetFacility() != local.facility) // #dev - debugging purpose { messageHandler->writeMessage("DEBUG", "[FREQ Match] other fac: " + atcCallsign + "(" + std::to_string(other.GetFacility()) + ") is NOT local fac: " + myCallsign + "(" + std::to_string(local.facility) + ")", vsid::MessageHandler::DebugArea::Dev); return false; } - else return false; + + return false; // default fallback state } /* * END OWN FUNCTIONS @@ -4930,6 +4932,10 @@ void vsid::VSIDPlugin::OnControllerPositionUpdate(EuroScopePlugIn::CController C const double atcFreq = Controller.GetPrimaryFrequency(); std::string atcIcao; + if (atcCallsign == ControllerMyself().GetCallsign()) return; + if (this->actAtc.contains(atcSI) || this->ignoreAtc.contains(atcSI)) return; + if (this->atcSiFailCounter.contains(atcCallsign) && this->atcSiFailCounter[atcCallsign] >= 10) return; + try { atcIcao = vsid::utils::split(atcCallsign, '_').at(0); @@ -4945,9 +4951,6 @@ void vsid::VSIDPlugin::OnControllerPositionUpdate(EuroScopePlugIn::CController C } } - if (atcCallsign == ControllerMyself().GetCallsign()) return; - if (this->actAtc.contains(atcSI) || this->ignoreAtc.contains(atcSI)) return; - // maximum 3 attempts to try and match the callsign or frequency against ese stored atc stations if (this->atcSiFailCounter.contains(atcCallsign) && this->atcSiFailCounter[atcCallsign] > 2 && this->atcSiFailCounter[atcCallsign] < 6) @@ -4983,6 +4986,14 @@ void vsid::VSIDPlugin::OnControllerPositionUpdate(EuroScopePlugIn::CController C return; } + if (atcCallsign.ends_with("FMP")) + { + messageHandler->writeMessage("DEBUG", "[" + atcCallsign + "] Skipping FMP station.", + vsid::MessageHandler::DebugArea::Atc + ); + return; + } + if (atcFreq < 0.1 || atcFreq > 199.0) { messageHandler->writeMessage("DEBUG", "[" + atcCallsign + "] Skipping ATC because the freq. is invalid (" + std::to_string(atcFreq) + ").", @@ -4990,6 +5001,26 @@ void vsid::VSIDPlugin::OnControllerPositionUpdate(EuroScopePlugIn::CController C ); return; } + + if (atcFac < 2) + { + if (!std::all_of(atcSI.begin(), atcSI.end(), [](char c) { return std::isdigit(static_cast(c)); })) + { + messageHandler->writeMessage("DEBUG", "[" + atcCallsign + "] Adding SI to ignore list because the facility is below 2 (usually FIS)", + vsid::MessageHandler::DebugArea::Atc + ); + + this->ignoreAtc.insert(atcSI); + + return; + } + + messageHandler->writeMessage("DEBUG", "[" + atcCallsign + "] Skipping ATC because the facility is below 2 (usually FIS) and SI cannot be stored (SI: " + atcSI + ").", + vsid::MessageHandler::DebugArea::Atc + ); + + return; + } if (atcSI.empty()) { @@ -5009,6 +5040,10 @@ void vsid::VSIDPlugin::OnControllerPositionUpdate(EuroScopePlugIn::CController C messageHandler->writeMessage("DEBUG", "[" + atcCallsign + "] Skipping ATC because the SI contains a number (SI: " + atcSI + "). Failed SI count: " + std::to_string(this->atcSiFailCounter[atcCallsign]), vsid::MessageHandler::DebugArea::Atc); + if (this->atcSiFailCounter[atcCallsign] == 10) + messageHandler->writeMessage("DEBUG", "[" + atcCallsign + "] Failed to get valid SI after 10 attempts. No more evaluation.", + vsid::MessageHandler::DebugArea::Atc); + return; } else if (this->atcSiFailCounter.contains(atcCallsign)) @@ -5018,14 +5053,6 @@ void vsid::VSIDPlugin::OnControllerPositionUpdate(EuroScopePlugIn::CController C this->atcSiFailCounter.erase(atcCallsign); } - - if (atcFac < 2) - { - messageHandler->writeMessage("DEBUG", "[" + atcCallsign + "] Skipping ATC because the facility is below 2 (usually FIS).", - vsid::MessageHandler::DebugArea::Atc - ); - return; - } EuroScopePlugIn::CController atcMyself = ControllerMyself(); std::set atcIcaos; @@ -5111,6 +5138,14 @@ void vsid::VSIDPlugin::OnControllerDisconnect(EuroScopePlugIn::CController Contr ); this->ignoreAtc.erase(atcSI); } + + if (this->atcSiFailCounter.contains(atcCallsign)) + { + messageHandler->writeMessage("DEBUG", "[" + atcCallsign + "] disconnected. Removing from SI fail counter list.", + vsid::MessageHandler::DebugArea::Atc + ); + this->atcSiFailCounter.erase(atcCallsign); + } } void vsid::VSIDPlugin::OnAirportRunwayActivityChanged()