Skip to content

Commit

Permalink
prep for release v1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
KingfuChan committed Mar 1, 2023
1 parent 3f7d297 commit fe99213
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 50 deletions.
56 changes: 28 additions & 28 deletions RDFPlugin/HiddenWindow.cpp
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
#include "stdafx.h"
#include "HiddenWindow.h"
#include "CRDFPlugin.h"


CRDFPlugin* rdfPlugin;

LRESULT CALLBACK HiddenWindow(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg) {
case WM_CREATE: {
rdfPlugin = reinterpret_cast<CRDFPlugin*>(reinterpret_cast<CREATESTRUCT*>(lParam)->lpCreateParams);
return TRUE;
}
case WM_COPYDATA: {
COPYDATASTRUCT* data = reinterpret_cast<COPYDATASTRUCT*>(lParam);

if (data != nullptr && data->dwData == 666 && data->lpData != nullptr && rdfPlugin != nullptr) {
rdfPlugin->ProcessAFVMessage(reinterpret_cast<const char*>(data->lpData));
}
return TRUE;
}
}

return DefWindowProc(hwnd, msg, wParam, lParam);
}


#include "stdafx.h"
#include "HiddenWindow.h"
#include "CRDFPlugin.h"


CRDFPlugin* rdfPlugin;

LRESULT CALLBACK HiddenWindow(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg) {
case WM_CREATE: {
rdfPlugin = reinterpret_cast<CRDFPlugin*>(reinterpret_cast<CREATESTRUCT*>(lParam)->lpCreateParams);
return TRUE;
}
case WM_COPYDATA: {
COPYDATASTRUCT* data = reinterpret_cast<COPYDATASTRUCT*>(lParam);

if (data != nullptr && data->dwData == 666 && data->lpData != nullptr && rdfPlugin != nullptr) {
rdfPlugin->ProcessAFVMessage(reinterpret_cast<const char*>(data->lpData));
}
return TRUE;
}
}

return DefWindowProc(hwnd, msg, wParam, lParam);
}



8 changes: 4 additions & 4 deletions RDFPlugin/HiddenWindow.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once

#include "stdafx.h"

#pragma once

#include "stdafx.h"

LRESULT CALLBACK HiddenWindow(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
Binary file modified RDFPlugin/RDFPlugin.aps
Binary file not shown.
Binary file modified RDFPlugin/RDFPlugin.rc
Binary file not shown.
24 changes: 12 additions & 12 deletions RDFPlugin/RDFPlugin.vcxproj.user
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerCommand>C:\Program Files (x86)\EuroScope\EuroScope.exe</LocalDebuggerCommand>
<LocalDebuggerWorkingDirectory>\\Mac\Home\Documents\EuroScope</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerCommand>C:\Program Files (x86)\EuroScope\EuroScope.exe</LocalDebuggerCommand>
<LocalDebuggerWorkingDirectory>\\Mac\Home\Documents\EuroScope</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerCommand>C:\Program Files (x86)\EuroScope\EuroScope.exe</LocalDebuggerCommand>
<LocalDebuggerWorkingDirectory>\\Mac\Home\Documents\EuroScope</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerCommand>C:\Program Files (x86)\EuroScope\EuroScope.exe</LocalDebuggerCommand>
<LocalDebuggerWorkingDirectory>\\Mac\Home\Documents\EuroScope</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
</Project>
35 changes: 29 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# RDF

## Support VectorAudio/0.5.0
## Support VectorAudio/0.5.0+

[VectorAudio](https://github.com/pierr3/VectorAudio) is an Audio-For-VATSIM ATC client for macOS and Linux. It provides better audio quality when EuroScope is running in a Windows virtual machine. This improved RDF plugin utilizes VectorAudio's SDK and sends HTTP GET request every second to get transmitting pilots *and controllers*.

Expand All @@ -12,34 +12,57 @@

## Configurations

So far the only way to configure the plugin is by modifying the settings file. The following is its format and default values.
There are two ways to modify the plugin settings - by settings file and by commandline functions.

```
This table shows all configurable items.

|Entry Name|Command Line Keyword|Default Value|
|-|-|-|
|VectorAudioAddress|ADDRESS|127.0.0.1:49080|
|VectorAudioTimeout|TIMEOUT|300|
|VectorAudioRetryInterval|INTERVAL|5|
|RGB|RGB|255:255:255|
|ConcurrentTransmissionRGB|CTRGB|255:0:0|
|Radius|RADIUS|20|
|Threshold|THRESHOLD|-1|
|Precision|PRECISION|0|
|DrawControllers|CONTROLLER|0|

E.g. In settings files the default is like the following:

```text
PLUGINS
<eventually existing configuration lines>
RDF Plugin for Euroscope:VectorAudioAddress:xxx.xxx.xxx.xxx:xxxxx
RDF Plugin for Euroscope:VectorAudioAddress:127.0.0.1:49080
RDF Plugin for Euroscope:VectorAudioTimeout:300
RDF Plugin for Euroscope:VectorAudioRetryInterval:5
RDF Plugin for Euroscope:RGB:255:255:255
RDF Plugin for Euroscope:ConcurrentTransmissionRGB:255:0:0
RDF Plugin for Euroscope:Radius:20
RDF Plugin for Euroscope:Threshold:-1
RDF Plugin for Euroscope:Precision:0
RDF Plugin for Euroscope:DrawControllers:0
END
```

+ **VectorAudioAddress** should include address and port only. E.g. 127.0.0.1:49080 or localhost:49080.
+ **VectorAudioAddress** should include address and port only. E.g. 127.0.0.1:49080 or localhost:49080, etc.
+ **VectorAudioTimeout** is in milliseconds. If any request takes longer time than it, the plugin will seize sending requests to VectorAudio until after a specified interval.
+ **VectorAudioRetryInterval** is in seconds. If the plugin disconnets from VectorAudio, it will attempt to re-establish connection every 5 seconds by default.
+ **RGB, ConcurrentTransmissionRGB**, see *Readme for Previous Version* below.
+ **Radius** is now in nautical miles. The circle will get bigger and smaller when zooming in and out.
+ **Radius** is in nautical miles (if **Threshold**>0). The circle will get bigger and smaller when zooming in and out.
+ **Threshold** determines the behaviour of drawing. If radius (to draw in pixel) is smaller than **Threshold**, it won't be drawn into a circle but a direction line (same as the situation when the target is outside of displayed area). If **Threshold**<0, there won't be any zooming effect, but instead a fixed **Radius** in pixel.
+ **Precision** is in nautical miles. It is the double of standard deviation in a normal distrubution, which means 97.72% of offset won't be farther than **Precision**. Using 0 means no random offset at all.
+ **DrawControllers** is compatible with both VectorAudio and AFV. It is used to cover OBS pilots especially in shared cockpit. Other transimitting controllers will be circled as well but without offset. 0 means OFF and other numeric value means ON.

When EuroScope is running, you can reload settings in *Settings File Setup* and then enter ***".RDF RELOAD"*** (case-insensitive) in command line.

For command line configurations, use ***".RDF KEYWORD VALUE"***, e.g. ***".RDF CTRGB 0:255:255"***. Also all command line functions are case-insensitive.

## Credits

+ [pierr3/VectorAudio](https://github.com/pierr3/VectorAudio): initiative.
+ [LeoChen98](https://github.com/LeoChen98), [websterzh](https://github.com/websterzh): idea of using HTTP requests.
+ [chembergj/RDF](https://github.com/chembergj/RDF): basic drawings.
+ [vaccfr/CoFrance](https://github.com/vaccfr/CoFrance), [yhirose/cpp-httplib](https://github.com/yhirose/cpp-httplib): methods to make asynchronous http requests.

# Readme for Previous Version (until 1.2.4)
Expand Down

0 comments on commit fe99213

Please sign in to comment.