Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyTWF committed Jan 4, 2022
2 parents 5fe9fd7 + 5228089 commit a64c061
Show file tree
Hide file tree
Showing 146 changed files with 5,850 additions and 3,293 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- 'main'
- 'alpha'
- 'beta'
pull_request:

jobs:
Expand Down Expand Up @@ -177,7 +179,7 @@ jobs:
release:
name: Release
runs-on: windows-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta' || github.ref == 'refs/heads/alpha')
needs: [build, format]
concurrency:
group: ukcp-release
Expand Down
22 changes: 22 additions & 0 deletions docs/UserGuide/Changelog/Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# UK Controller Plugin Changelog

## [3.13.1](https://github.com/VATSIM-UK/uk-controller-plugin/compare/3.13.0...3.13.1) (2022-01-04)


### Bug Fixes

* **intentioncode:** euroscope freezing when aircraft cleared beyond exit point ([#391](https://github.com/VATSIM-UK/uk-controller-plugin/issues/391)) ([5b17241](https://github.com/VATSIM-UK/uk-controller-plugin/commit/5b17241abb7098e53b742b5a359b24090762fb45))

# [3.13.0](https://github.com/VATSIM-UK/uk-controller-plugin/compare/3.12.0...3.13.0) (2022-01-02)


### Bug Fixes

* **srd:** only prepopulate destination airfield into SRD search for EG and EI ([#381](https://github.com/VATSIM-UK/uk-controller-plugin/issues/381)) ([e2f3492](https://github.com/VATSIM-UK/uk-controller-plugin/commit/e2f3492e429c78840148865127245da300431777)), closes [#380](https://github.com/VATSIM-UK/uk-controller-plugin/issues/380)


### Features

* **metar:** Add QFE to pressure monitor messages, QFE query command ([#376](https://github.com/VATSIM-UK/uk-controller-plugin/issues/376)) ([5d32b92](https://github.com/VATSIM-UK/uk-controller-plugin/commit/5d32b925b807409b78e99dd7491f791458fdb436))
* **release:** Allow the plugin to work on multiple update channels ([#387](https://github.com/VATSIM-UK/uk-controller-plugin/issues/387)) ([e2487ec](https://github.com/VATSIM-UK/uk-controller-plugin/commit/e2487ecdb32e57d73aa0aef5a952b16f3f13d3cf))
* **releases:** Allow remarks when approving and rejecting departure releases ([#389](https://github.com/VATSIM-UK/uk-controller-plugin/issues/389)) ([f039d9d](https://github.com/VATSIM-UK/uk-controller-plugin/commit/f039d9d7fc2cbd9d7967f89b40075c04c0825080))
* **srd:** Prepopulate FIR exits in the SRD dialog ([#382](https://github.com/VATSIM-UK/uk-controller-plugin/issues/382)) ([a083cba](https://github.com/VATSIM-UK/uk-controller-plugin/commit/a083cba09a45293401605102cb664480c6cc3357)), closes [#380](https://github.com/VATSIM-UK/uk-controller-plugin/issues/380)

# [3.12.0](https://github.com/VATSIM-UK/uk-controller-plugin/compare/3.11.0...3.12.0) (2021-12-21)


Expand Down
2 changes: 1 addition & 1 deletion docs/UserGuide/Features/Features.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dynamically to the plugin.
- Actual off-block times
- Estimated departure times
- UK Wake Categories
- QNH change notifications
- [Pressure Monitor and Notifications](PressureMonitor.md)
- Hold Manager, synced between controllers
- [Departure Handoff Indicator](Handoffs.md)
- Altimeter setting regions and regional pressures
Expand Down
25 changes: 25 additions & 0 deletions docs/UserGuide/Features/PressureMonitor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Pressure Monitor

The plugin provides functionality for aerodrome controllers to monitor changes in pressure. This allows controllers to
be notified of important pressure changes so that they can then update pilots.

## Configuration

Configuration for the Pressure Monitor is under the "General Settings" option of the `OP` menu.

## Pressure Update Notifications

Pressure update notifications are displayed to controllers in the `UKCP_PRESSURE_MONITOR` chat handler.

These messages will display the QNH/QFE before and after. Messages will not be sent for the first time a pressure is
updated, or if the pressure does not change between METARs.

## Querying Pressure

Users may query the plugin to provide the current QNH and QFE at any airfield they wish.

This is achieved by typing a command into the EuroScope chat box, as follows:

`.ukcp pressure EGKK`

The plugin will then respond in the `UKCP_PRESSURE_MONITOR` with the current QNH and QFE at the given airfield.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@
"release": {
"repositoryUrl": "https://github.com/VATSIM-UK/uk-controller-plugin",
"branches": [
"main"
"main",
{"name": "beta", "prerelease": true},
{"name": "alpha", "prerelease": true}
],
"tagFormat": "${version}",
"plugins": [
Expand Down
37 changes: 33 additions & 4 deletions resource/UKControllerPlugin.rc
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ BEGIN
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,71,117,10
CONTROL "Automatically Assign Initial Headings",GS_DIALOG_IH_CHECK,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,39,126,10
LTEXT "Experimental settings, modify at your own risk:",IDC_GEN_SETTINGS_EXPERIMENTAL,14,90,136,8
COMBOBOX IDC_RELEASE_CHANNEL,14,104,66,35,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
LTEXT "Update Channel",IDC_STATIC,87,106,50,8
END

IDD_TIMER_CONFIGURATION DIALOGEX 0, 0, 179, 158
Expand Down Expand Up @@ -277,20 +280,22 @@ BEGIN
COMBOBOX IDC_DEPARTURE_RELEASE_TARGET_CONTROLLER,71,39,89,72,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
END

IDD_DEPARTURE_RELEASE_APPROVE DIALOGEX 0, 0, 175, 137
IDD_DEPARTURE_RELEASE_APPROVE DIALOGEX 0, 0, 175, 207
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Approve Departure Release"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Approve",IDOK,56,116,50,14
PUSHBUTTON "Cancel",IDCANCEL,110,116,50,14
DEFPUSHBUTTON "Approve",IDOK,56,186,50,14
PUSHBUTTON "Cancel",IDCANCEL,110,186,50,14
LTEXT "Callsign",IDC_DEPARTURE_RELEASE_APPROVE_CALLSIGN_STATIC,7,15,25,8
EDITTEXT IDC_DEPARTURE_RELEASE_APPROVE_CALLSIGN,60,12,76,14,ES_AUTOHSCROLL | ES_READONLY
LTEXT "Valid For",IDC_DEPARTURE_RELEASE_APPROVE_VALIDFOR_STATIC,7,39,28,8
COMBOBOX IDC_DEPARTURE_RELEASE_APPROVE_VALIDFOR,60,36,76,71,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "",IDC_DEPARTURE_RELEASE_APPROVE_RELEASED_AT,
"SysDateTimePick32",DTS_RIGHTALIGN | DTS_UPDOWN | WS_TABSTOP | 0x8,60,60,100,15
LTEXT "Released At (Z)",IDC_DEPARTURE_RELEASE_APPROVE_RELEASED_AT_STATIC,7,64,51,8
EDITTEXT IDC_RELEASE_APPROVE_REMARKS,7,97,161,80,ES_MULTILINE
LTEXT "Remarks and Instructions",IDC_RELEASE_APPROVE_REMARKS_STATIC,9,86,82,8
END

IDD_MISSED_APPROACH DIALOGEX 0, 0, 257, 311
Expand Down Expand Up @@ -329,6 +334,17 @@ BEGIN
LTEXT "Remarks",IDC_MISSED_APPROACH_STATIC,141,7,28,8
END

IDD_DEPARTURE_RELEASE_REJECT DIALOGEX 0, 0, 177, 115
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Reject Departure Release"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Reject",IDOK,66,94,50,14
PUSHBUTTON "Cancel",IDCANCEL,120,94,50,14
EDITTEXT IDC_RELEASE_REJECT_REMARKS,7,28,162,54,ES_MULTILINE
LTEXT "Remarks",IDC_RELEASE_REJECT_REMARKS_STATIC,7,14,28,8
END


/////////////////////////////////////////////////////////////////////////////
//
Expand Down Expand Up @@ -433,7 +449,7 @@ BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 168
TOPMARGIN, 7
BOTTOMMARGIN, 130
BOTTOMMARGIN, 200
END

IDD_MISSED_APPROACH, DIALOG
Expand All @@ -451,6 +467,14 @@ BEGIN
TOPMARGIN, 7
BOTTOMMARGIN, 95
END

IDD_DEPARTURE_RELEASE_REJECT, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 170
TOPMARGIN, 7
BOTTOMMARGIN, 108
END
END
#endif // APSTUDIO_INVOKED

Expand Down Expand Up @@ -530,6 +554,11 @@ BEGIN
0
END

IDD_DEPARTURE_RELEASE_REJECT AFX_DIALOG_LAYOUT
BEGIN
0
END


/////////////////////////////////////////////////////////////////////////////
//
Expand Down
12 changes: 9 additions & 3 deletions resource/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#define WAVE_MISSED_APPROACH 136
#define IDD_MISSED_APPROACH 137
#define IDD_MISSED_APPROACH_ACKNOWLEDGE 139
#define IDD_DEPARTURE_RELEASE_REJECT 141
#define IDC_CHECK_DEGRADING 1001
#define IDC_CHECK_FADING 1002
#define IDC_CHECK_AA 1003
Expand Down Expand Up @@ -128,6 +129,7 @@
#define IDC_DEPARTURE_RELEASE_REQUEST_CALLSIGN 1087
#define IDC_DEPARTURE_RELEASE_APPROVE_CALLSIGN 1087
#define MISSED_APPROACH_DRAW_DURATION 1087
#define IDC_RELEASE_REJECT_REMARKS 1087
#define IDC_NOTES_STATIC 1088
#define IDC_HOLD_PARAMS_MIN_STATIC 1089
#define IDC_NOTIFICATION_BODY 1089
Expand Down Expand Up @@ -189,16 +191,20 @@
#define MISSED_APPROACH_DRAW_SERVICE_LIST 1134
#define MISSED_APPROACH_DRAW_DURATION_TEXT 1135
#define IDC_MISSED_APPROACH_REMARKS 1137
#define IDC_MISSED_APPROACH_STATICS 1138
#define IDC_MISSED_APPROACH_STATIC 1138
#define IDC_RELEASE_APPROVE_REMARKS 1139
#define IDC_RELEASE_APPROVE_REMARKS_STATIC 1140
#define IDC_RELEASE_REJECT_REMARKS_STATIC 1141
#define IDC_GEN_SETTINGS_EXPERIMENTAL 1142
#define IDC_RELEASE_CHANNEL 1143

// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 141
#define _APS_NEXT_RESOURCE_VALUE 143
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1139
#define _APS_NEXT_CONTROL_VALUE 1144
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
51 changes: 17 additions & 34 deletions src/loader/loader/loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@
#include "euroscope/EuroScopePlugIn.h"

// Define the functions we need from the various libraries
typedef bool (CALLBACK* PERFORMUPDATES)();
typedef EuroScopePlugIn::CPlugIn* (CALLBACK* LOADPLUGINLIBRARY)();
typedef void (CALLBACK* UNLOADPLUGINLIBRARY)();
typedef bool(CALLBACK* PERFORMUPDATES)();
typedef EuroScopePlugIn::CPlugIn*(CALLBACK* LOADPLUGINLIBRARY)();
typedef void(CALLBACK* UNLOADPLUGINLIBRARY)();

void RunUpdater(
UKControllerPlugin::Windows::WinApiInterface& windows
)
void RunUpdater(UKControllerPlugin::Windows::WinApiInterface& windows)
{
LogInfo("Loading updater library");
HINSTANCE updaterHandle = windows.LoadLibraryRelative(GetUpdaterBinaryRelativePath());
Expand All @@ -28,9 +26,8 @@ void RunUpdater(
}

LogInfo("Performing updates, please refer to the updater log for more information");
PERFORMUPDATES PerformUpdates = reinterpret_cast<PERFORMUPDATES>(
windows.GetFunctionPointerFromLibrary(updaterHandle, "PerformUpdates")
);
PERFORMUPDATES PerformUpdates =
reinterpret_cast<PERFORMUPDATES>(windows.GetFunctionPointerFromLibrary(updaterHandle, "PerformUpdates"));

/*
* If the updater returns false, it means the user wouldn't let it update.
Expand All @@ -44,27 +41,22 @@ void RunUpdater(
windows.UnloadLibrary(updaterHandle);
}

HINSTANCE LoadPluginLibrary(
UKControllerPlugin::Windows::WinApiInterface& windows
)
HINSTANCE LoadPluginLibrary(UKControllerPlugin::Windows::WinApiInterface& windows)
{
LogInfo("Loading core plugin library");
return windows.LoadLibraryRelative(GetCoreBinaryRelativePath());
}

EuroScopePlugIn::CPlugIn* LoadPlugin(
HINSTANCE pluginLibraryHandle,
UKControllerPlugin::Windows::WinApiInterface& windows
)
EuroScopePlugIn::CPlugIn*
LoadPlugin(HINSTANCE pluginLibraryHandle, UKControllerPlugin::Windows::WinApiInterface& windows)
{
if (pluginLibraryHandle == nullptr) {
LogInfo("Not loading core plugin, library handle is null");
return nullptr;
}

LOADPLUGINLIBRARY LoadPlugin = reinterpret_cast<LOADPLUGINLIBRARY>(
windows.GetFunctionPointerFromLibrary(pluginLibraryHandle, "LoadPlugin")
);
LOADPLUGINLIBRARY LoadPlugin =
reinterpret_cast<LOADPLUGINLIBRARY>(windows.GetFunctionPointerFromLibrary(pluginLibraryHandle, "LoadPlugin"));

if (!LoadPlugin) {
LogError("Cannot find LoadPlugin function in Core binary");
Expand All @@ -74,24 +66,19 @@ EuroScopePlugIn::CPlugIn* LoadPlugin(
return nullptr;
}


LogInfo("Performing core plugin load");
return LoadPlugin();
}

void UnloadPlugin(
HINSTANCE pluginLibraryHandle,
UKControllerPlugin::Windows::WinApiInterface& windows
)
void UnloadPlugin(HINSTANCE pluginLibraryHandle, UKControllerPlugin::Windows::WinApiInterface& windows)
{
if (pluginLibraryHandle == nullptr) {
LogInfo("Not unloading core plugin, library handle is null");
return;
}

UNLOADPLUGINLIBRARY UnloadPlugin = reinterpret_cast<UNLOADPLUGINLIBRARY>(
windows.GetFunctionPointerFromLibrary(pluginLibraryHandle, "UnloadPlugin")
);
windows.GetFunctionPointerFromLibrary(pluginLibraryHandle, "UnloadPlugin"));

if (!UnloadPlugin) {
LogError("Cannot find UnloadPlugin function in Core binary");
Expand All @@ -105,10 +92,7 @@ void UnloadPlugin(
UnloadPlugin();
}

void UnloadPluginLibrary(
HINSTANCE instance,
UKControllerPlugin::Windows::WinApiInterface& windows
)
void UnloadPluginLibrary(HINSTANCE instance, UKControllerPlugin::Windows::WinApiInterface& windows)
{
if (instance == nullptr) {
LogInfo("Not unloading core library, was never loaded");
Expand All @@ -122,8 +106,7 @@ void UnloadPluginLibrary(
bool FirstTimeDownload(
const UKControllerPlugin::Api::ApiInterface& api,
UKControllerPlugin::Windows::WinApiInterface& windows,
UKControllerPlugin::Curl::CurlInterface& curl
)
UKControllerPlugin::Curl::CurlInterface& curl)
{
if (windows.FileExists(GetUpdaterBinaryRelativePath())) {
LogInfo("Updater binary exists in filesystem, skipping first time download");
Expand All @@ -138,7 +121,7 @@ bool FirstTimeDownload(
LogInfo("Performing first time download of updater");
nlohmann::json updateData;
try {
updateData = UKControllerPlugin::GetUpdateData(api);
updateData = UKControllerPlugin::GetUpdateData(api, "stable");
} catch (std::exception) {
LogError("Failed to get first time update data");
DisplayFirstTimeDownloadFailedMessage(windows);
Expand All @@ -161,7 +144,7 @@ bool DisplayFirstTimeDownloadMessage(UKControllerPlugin::Windows::WinApiInterfac
message += L"to install the core plugin.\r\n\r\n";
message += L"Select OK to continue.";
return windows.OpenMessageBox(message.c_str(), L"UKCP First Time Download", MB_OKCANCEL | MB_ICONINFORMATION) ==
IDOK;
IDOK;
}

void DisplayFirstTimeDownloadFailedMessage(UKControllerPlugin::Windows::WinApiInterface& windows)
Expand Down
21 changes: 17 additions & 4 deletions src/plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -450,16 +450,29 @@ source_group("src\\message" FILES ${src__message})
set(src__metar
"metar/MetarEventHandlerCollection.cpp"
"metar/MetarEventHandlerCollection.h"
metar/MetarEventHandlerInterface.cpp
"metar/MetarEventHandlerInterface.h"
"metar/MetarParsingFunctions.cpp"
"metar/MetarParsingFunctions.h"
"metar/PressureChangeMessage.cpp"
"metar/PressureChangeMessage.h"
"metar/PressureMonitor.cpp"
"metar/PressureMonitor.h"
"metar/PressureMonitorBootstrap.cpp"
"metar/PressureMonitorBootstrap.h"
metar/MetarEventHandlerInterface.cpp)
metar/ParsedMetar.cpp metar/ParsedMetar.h
metar/PressureComponent.h metar/PressureComponent.cpp
metar/PressureUnit.h
metar/MetarComponents.h
metar/ParsedMetarCollection.cpp metar/ParsedMetarCollection.h
metar/MetarComponentsFactory.cpp metar/MetarComponentsFactory.h
metar/MetarComponentFactoryInterface.h
metar/PressureComponentFactory.cpp metar/PressureComponentFactory.h
metar/MetarComponentsFactoryFactory.cpp metar/MetarComponentsFactoryFactory.h
metar/MetarsUpdatedPushEventProcessor.cpp metar/MetarsUpdatedPushEventProcessor.h
metar/ParsedMetarFactory.cpp metar/ParsedMetarFactory.h
metar/MetarModule.cpp metar/MetarModule.h
metar/PressureQueryCommandHandler.cpp metar/PressureQueryCommandHandler.h
metar/PressureQueryMessage.cpp metar/PressureQueryMessage.h
metar/PressureNotFoundMessage.cpp metar/PressureNotFoundMessage.h)
source_group("src\\metar" FILES ${src__metar})

set(src__minstack
Expand Down Expand Up @@ -726,7 +739,7 @@ set(src__releases
"releases/RequestDepartureReleaseDialog.h"
"releases/ToggleDepartureReleaseDecisionList.cpp"
"releases/ToggleDepartureReleaseDecisionList.h"
releases/EnrouteRelease.cpp releases/EnrouteReleaseType.cpp)
releases/EnrouteRelease.cpp releases/EnrouteReleaseType.cpp releases/RejectDepartureReleaseDialog.cpp releases/RejectDepartureReleaseDialog.h releases/ReleaseApprovalRemarksUserMessage.cpp releases/ReleaseApprovalRemarksUserMessage.h releases/ReleaseRejectionRemarksUserMessage.cpp releases/ReleaseRejectionRemarksUserMessage.h)
source_group("src\\releases" FILES ${src__releases})

set(src__sectorfile
Expand Down

0 comments on commit a64c061

Please sign in to comment.