Skip to content

Commit

Permalink
VS 2019 compatible, with relative paths
Browse files Browse the repository at this point in the history
  • Loading branch information
dquill78 committed Jun 1, 2020
1 parent 8edbc7d commit 72bf497
Show file tree
Hide file tree
Showing 14 changed files with 285 additions and 29 deletions.
29 changes: 15 additions & 14 deletions Airborne-CPS.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -69,33 +69,33 @@
<SccProjectName />
<SccLocalPath />
<ProjectGuid>{82734F7E-BD29-4111-B5F5-9D099CA35788}</ProjectGuid>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<ProjectName>Airborne-CPS</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand All @@ -118,15 +118,15 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>D:\Ayy lmao\X-Plane 10\Resources\plugins</OutDir>
<OutDir>..\X-Plane 10\Resources\plugins\</OutDir>
<IntDir>.\Release\32\</IntDir>
<LinkIncremental>false</LinkIncremental>
<TargetExt>.xpl</TargetExt>
<GenerateManifest>false</GenerateManifest>
<TargetName>AirborneCPS</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>D:\Ayy lmao\X-Plane 11\Resources\plugins</OutDir>
<OutDir>.\Test64bitOutput\</OutDir>
<IntDir>.\Release\64\</IntDir>
<LinkIncremental>false</LinkIncremental>
<TargetExt>.xpl</TargetExt>
Expand All @@ -142,7 +142,7 @@
<TargetName>AirborneCPS</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>..\..\..\..\..\X-Plane 10\Resources\plugins</OutDir>
<OutDir>..\X-Plane 10\Resources\plugins</OutDir>
<IntDir>.\Debug\64\</IntDir>
<LinkIncremental>false</LinkIncremental>
<TargetExt>.xpl</TargetExt>
Expand All @@ -158,7 +158,7 @@
<Optimization>MinSpace</Optimization>
<SuppressStartupBanner>true</SuppressStartupBanner>
<WarningLevel>Level3</WarningLevel>
<AdditionalIncludeDirectories>C:\Users\Rob\source\repos\4_30\SDK\Delphi\Widgets;C:\Users\Rob\source\repos\4_30\SDK\Delphi\XPLM;C:\Users\Rob\source\repos\4_30\SDK\CHeaders\XPLM;C:\Users\Rob\source\repos\4_30\SDK\CHeaders\Widgets;C:\Users\Rob\source\repos\4_30\src;C:\Users\Rob\source\repos\4_30\SDK\CHeaders</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)\SDK\Delphi\Widgets;$(SolutionDir)\SDK\Delphi\XPLM;$(SolutionDir)\SDK\CHeaders\XPLM;$(SolutionDir)\SDK\CHeaders\Widgets;$(SolutionDir)\src;$(SolutionDir)\SDK\CHeaders</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;SIMDATA_EXPORTS;IBM=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AssemblerListingLocation>.\Release\32\</AssemblerListingLocation>
<PrecompiledHeaderOutputFile>.\Release\32\ExampleGauge.pch</PrecompiledHeaderOutputFile>
Expand All @@ -167,6 +167,7 @@
<ObjectFileName>.\Release\32\</ObjectFileName>
<ProgramDataBaseFileName>.\Release\32\</ProgramDataBaseFileName>
<StructMemberAlignment>Default</StructMemberAlignment>
<LanguageStandard>Default</LanguageStandard>
</ClCompile>
<Midl>
<SuppressStartupBanner>true</SuppressStartupBanner>
Expand All @@ -189,7 +190,7 @@
<SubSystem>Console</SubSystem>
<ImportLibrary>.\Release\32\ExampleGauge.lib</ImportLibrary>
<AdditionalDependencies>Opengl32.lib;odbc32.lib;odbccp32.lib;XPLM.lib;XPWidgets.lib;glaux.lib;glu32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>C:\Users\Rob\source\repos\4_30\SDK\CHeaders\google\protobuf;C:\Users\Rob\source\repos\4_30\Release\32;C:\Users\Rob\source\repos\4_30\SDK\Libraries\Win</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(SolutionDir)\SDK\CHeaders\google\protobuf;$(SolutionDir)\Release\32;$(SolutionDir)\SDK\Libraries\Win</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
Expand All @@ -201,7 +202,7 @@
<Optimization>MaxSpeed</Optimization>
<SuppressStartupBanner>true</SuppressStartupBanner>
<WarningLevel>Level3</WarningLevel>
<AdditionalIncludeDirectories>C:\Users\Rob\source\repos\4_30\SDK\CHeaders\XPLM;C:\Users\Rob\source\repos\4_30\SDK\CHeaders\Widgets;C:\Users\Rob\source\repos\4_30\src;C:\Users\Rob\source\repos\4_30\SDK\CHeaders;C:\Users\Rob\source\repos\4_30\SDK\Delphi\Widgets;C:\Users\Rob\source\repos\4_30\SDK\Delphi\XPLM</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)\SDK\CHeaders\XPLM;$(SolutionDir)\SDK\CHeaders\Widgets;$(SolutionDir)\src;$(SolutionDir)\SDK\CHeaders;$(SolutionDir)\SDK\Delphi\Widgets;$(SolutionDir)\SDK\Delphi\XPLM</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;SIMDATA_EXPORTS;IBM=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AssemblerListingLocation>.\Release\64\</AssemblerListingLocation>
<PrecompiledHeaderOutputFile>.\Release\64\ExampleGauge.pch</PrecompiledHeaderOutputFile>
Expand Down Expand Up @@ -230,7 +231,7 @@
<LinkDLL>true</LinkDLL>
<SubSystem>Console</SubSystem>
<ImportLibrary>.\Release\64\ExampleGauge.lib</ImportLibrary>
<AdditionalLibraryDirectories>C:\Users\Rob\source\repos\4_30\SDK\Libraries\Win;C:\Users\Rob\source\repos\4_30\Release\64</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(SolutionDir)\SDK\Libraries\Win;$(SolutionDir)\Release\64</AdditionalLibraryDirectories>
<AdditionalDependencies>Opengl32.lib;odbc32.lib;odbccp32.lib;XPLM_64.lib;XPWidgets_64.lib;glaux.lib;glu32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
Expand Down Expand Up @@ -288,7 +289,7 @@
<Optimization>Disabled</Optimization>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<AdditionalIncludeDirectories>C:\Users\Oswego\Documents\Master 9-10-19\Airborne-CPS-master\SDK\Delphi\Widgets;C:\Users\Oswego\Documents\Master 9-10-19\Airborne-CPS-master\SDK\Delphi\XPLM;C:\Users\Oswego\Documents\Master 9-10-19\Airborne-CPS-master\SDK\CHeaders\Widgets;C:\Users\Oswego\Documents\Master 9-10-19\Airborne-CPS-master\SDK\CHeaders\XPLM;C:\Users\Oswego\Documents\Master 9-10-19\Airborne-CPS-master\SDK\CHeaders;C:\Users\Oswego\Documents\Master 9-10-19\Airborne-CPS-master\src</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)\SDK\Delphi\Widgets;$(SolutionDir)\SDK\Delphi\XPLM;$(SolutionDir)\SDK\CHeaders\Widgets;$(SolutionDir)\SDK\CHeaders\XPLM;$(SolutionDir)\SDK\CHeaders;$(SolutionDir)\src</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;SIMDATA_EXPORTS;IBM=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AssemblerListingLocation>.\Debug\64\</AssemblerListingLocation>
<PrecompiledHeaderOutputFile>.\Debug\64\ExampleGauge.pch</PrecompiledHeaderOutputFile>
Expand Down Expand Up @@ -319,7 +320,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<ImportLibrary>.\Debug\64\ExampleGauge.lib</ImportLibrary>
<AdditionalLibraryDirectories>C:\Users\Oswego\Documents\Master 9-10-19\Airborne-CPS-master\SDK\Libraries\Win;C:\Users\Oswego\Documents\Master 9-10-19\Airborne-CPS-master\SDK\CHeaders\google\protobuf;C:\Users\Oswego\Documents\Master 9-10-19\Airborne-CPS-master\Release\32</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(SolutionDir)\SDK\Libraries\Win;$(SolutionDir)\SDK\CHeaders\google\protobuf;$(SolutionDir)\Release\32</AdditionalLibraryDirectories>
<AdditionalDependencies>Opengl32.lib;odbc32.lib;odbccp32.lib;XPLM_64.lib;XPWidgets_64.lib;glaux.lib;glu32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
Expand Down
3 changes: 2 additions & 1 deletion SDK/CHeaders/XPLM/XPLMDisplay.h
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,8 @@ XPLM_API void XPLMGetMouseLocation(
* which make this easy.
*
*/
XPLM_API XPLMWindowID XPLMCreateWindow(
XPLM_API XPLMWindowID
XPLMCreateWindow(
int inLeft,
int inTop,
int inRight,
Expand Down
13 changes: 13 additions & 0 deletions Specification/fmsPlans/KEWRKJFK.fms
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
I
3 version
0
2
1 KEWR 0 40.692500 -74.168700
1 KJFK 0 40.639900 -73.778700
1 KLGA 0 40.777300 -73.872600
1 KEWR 0 40.692500 -74.168700
1 KJFK 0 40.639900 -73.778700
1 KLGA 0 40.777300 -73.872600
1 KEWR 0 40.692500 -74.168700
1 KJFK 0 40.639900 -73.778700
1 KLGA 0 40.777300 -73.872600
13 changes: 13 additions & 0 deletions Specification/fmsPlans/KSEA-KBFI-KFNR.fms
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
I
3 version
1
8
1 KSEA 433 47.450188 -122.312325
1 KBFI 20 47.531101 -122.302521
1 KSEA 433 47.450188 -122.312325
1 KRNT 32 47.493134 -122.215736
1 KSEA 433 47.450188 -122.312325
1 KBFI 20 47.531101 -122.302521
1 KRNT 32 47.493134 -122.215736
1 KSEA 433 47.450188 -122.312325
1 KRNT 32 47.493134 -122.215736
18 changes: 18 additions & 0 deletions Specification/fmsPlans/KSEAKBFI.fms
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
I
3 version
0
2
1 KSEA 0 47.449900 -122.311800
1 KBFI 0 47.530000 -122.302000
1 KSEA 0 47.449900 -122.311800
1 KBFI 0 47.530000 -122.302000
1 KSEA 0 47.449900 -122.311800
1 KBFI 0 47.530000 -122.302000
1 KSEA 0 47.449900 -122.311800
1 KBFI 0 47.530000 -122.302000
1 KSEA 0 47.449900 -122.311800
1 KBFI 0 47.530000 -122.302000
1 KSEA 0 47.449900 -122.311800
1 KBFI 0 47.530000 -122.302000
1 KSEA 0 47.449900 -122.311800
1 KBFI 0 47.530000 -122.302000
17 changes: 17 additions & 0 deletions Specification/fmsPlans/clock.fms
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
I
3 version
1
12
1 LOWI 1906 47.260227 11.343966
1 LIPB 789 46.458904 11.326862
1 LIVD 3982 46.726112 12.224161
1 LOIJ 2198 47.520176 12.449501
1 LOWI 1906 47.260227 11.343966
1 LIPB 789 46.458904 11.326862
1 LIVD 3982 46.726112 12.224161
1 LOIJ 2198 47.520176 12.449501
1 LOWI 1906 47.260227 11.343966
1 LIPB 789 46.458904 11.326862
1 LIVD 3982 46.726112 12.224161
1 LOIJ 2198 47.520176 12.449501
1 LOWI 1906 47.260227 11.343966
17 changes: 17 additions & 0 deletions Specification/fmsPlans/counter.fms
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
I
3 version
1
12
1 LOKL 2088 46.798000 12.887000
1 LOWZ 2470 47.292072 12.790411
1 LOIJ 2198 47.520176 12.449501
1 LIVD 3982 46.726112 12.224161
1 LOKL 2088 46.798000 12.887000
1 LOWZ 2470 47.292072 12.790411
1 LOIJ 2198 47.520176 12.449501
1 LIVD 3982 46.726112 12.224161
1 LOKL 2088 46.798000 12.887000
1 LOWZ 2470 47.292072 12.790411
1 LOIJ 2198 47.520176 12.449501
1 LIVD 3982 46.726112 12.224161
1 LOKL 2088 46.798000 12.887000
28 changes: 28 additions & 0 deletions Specification/fmsPlans/fp2.fms
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
I
3 version
1
23
1 ED02 2631 47.582962 10.690187
1 LOIR 2811 47.470757 10.690753
1 ED02 2631 47.582962 10.690187
1 LOIR 2811 47.470757 10.690753
1 ED02 2631 47.582962 10.690187
1 LOIR 2811 47.470757 10.690753
1 ED02 2631 47.582962 10.690187
1 LOIR 2811 47.470757 10.690753
1 ED02 2631 47.582962 10.690187
1 LOIR 2811 47.470757 10.690753
1 ED02 2631 47.582962 10.690187
1 LOIR 2811 47.470757 10.690753
1 ED02 2631 47.582962 10.690187
1 LOIR 2811 47.470757 10.690753
1 ED02 2631 47.582962 10.690187
1 LOIR 2811 47.470757 10.690753
1 ED02 2631 47.582962 10.690187
1 LOIR 2811 47.470757 10.690753
1 ED02 2631 47.582962 10.690187
1 LOIR 2811 47.470757 10.690753
1 ED02 2631 47.582962 10.690187
1 LOIR 2811 47.470757 10.690753
1 ED02 2631 47.582962 10.690187
1 LOIR 2811 47.470757 10.690753
Binary file added Test64bitOutput/AirborneCPS.xpl
Binary file not shown.
6 changes: 3 additions & 3 deletions src/component/ArtHorizGaugeRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ void AHGaugeRenderer::drawAltitudeIndicator(float currentAltitude) const {
}

void AHGaugeRenderer::writeAltitude(float currentAltitude) const {
writeNumber((int)std::round(currentAltitude), altimeterDisplayLeft,
writeNumber((int)round(currentAltitude), altimeterDisplayLeft,
((altimeterDisplayTopLow - altimeterDisplayBottomHigh) / 2.0 + altimeterDisplayBottomHigh), true);
}

Expand Down Expand Up @@ -1084,7 +1084,7 @@ void AHGaugeRenderer::drawAirspeedGaugeIndicator(float currentAirspeed) const {
}

void AHGaugeRenderer::writeAirspeed(float currentAirspeed) const {
writeNumber((int)std::roundf(currentAirspeed), airspeedGaugeDisplayRight,
writeNumber((int)roundf(currentAirspeed), airspeedGaugeDisplayRight,
((airspeedGaugeDisplayTopLow - airspeedGaugeDisplayBottomHigh) / 2.0 + airspeedGaugeDisplayBottomHigh), false);
}

Expand Down Expand Up @@ -1209,7 +1209,7 @@ void AHGaugeRenderer::drawIntrudingAircraft(LLA const * const intruderPos, Veloc
glVertex2d(symbolLeft, symbolBottom);

Distance altitudeDifference = intruderPos->altitude - gaugeCenterPos->altitude;
int altDiffHundredsFtPerMin = (int)std::round(altitudeDifference.toFeet() / 100.0);
int altDiffHundredsFtPerMin = (int)round(altitudeDifference.toFeet() / 100.0);

ahtextureconstants::TexCoords const * signChar = altDiffHundredsFtPerMin < 0.0 ? &ahtextureconstants::K_CHAR_MINUS_SIGN : &ahtextureconstants::K_CHAR_PLUS_SIGN;
altDiffHundredsFtPerMin = abs(altDiffHundredsFtPerMin);
Expand Down
23 changes: 17 additions & 6 deletions src/component/Transponder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
std::string Transponder::macAddress_ = "";
std::atomic<bool> Transponder::initialized_ = false;

Transponder::Transponder(Aircraft* ac, concurrency::concurrent_unordered_map<std::string, Aircraft*>* intruders, concurrency::concurrent_unordered_map<std::string, ResolutionConnection*>* connections, Decider* decider)
Transponder::Transponder(Aircraft* ac,
concurrency::concurrent_unordered_map<std::string,
Aircraft*>* intruders,
concurrency::concurrent_unordered_map<std::string, ResolutionConnection*> *connections,
Decider* decider)
{
decider_ = decider;
aircraft_ = ac;
Expand Down Expand Up @@ -73,11 +77,7 @@ DWORD Transponder::receiveLocation()
while (communication)
{
XPLMDebugString("Pre receive");
<<<<<<< HEAD
//temp = myLocation;
//temp.BuildPlane();
=======
>>>>>>> 934d9e673c4b28f30c9f6029b944dea13a5b9185

int size = myLocation.getSize();
char* buffer = (char*)malloc(size);
myID = myLocation.getID().c_str();
Expand Down Expand Up @@ -171,7 +171,18 @@ DWORD Transponder::sendLocation()
char * buffer = new char[myLocation.getPLANE().length() + 1];
std::strcpy(buffer, myLocation.getPLANE().c_str());


// basic idea of how to maybe serialize our data as binary data instead of ascii/unicode characters
//char outputbuffer[40];
//outputbuffer[3] = myLocation.setLAT & 0xFF;
//outputbuffer[2] = (myLocation.setLAT >> 8 ) & 0xFF;
//outputbuffer[1] = (myLocation.setLAT >> 16) & 0xFF;
//outputbuffer[0] = (myLocation.setLAT >> 24) & 0xFF;

//outputbuffer[4] = myLocation.setLON & 0xFF;



//changes here
//void* buffer = (char*)malloc(size);
//buffer = (void *) myLocation.getPLANE().c_str();
Expand Down
2 changes: 1 addition & 1 deletion src/component/VSpeedIndicatorGaugeRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ void VSIGaugeRenderer::drawIntrudingAircraft(LLA const * const intruderPos, Velo
drawTextureRegion(symbolCoords, symbolLeft, symbolRight, symbolTop, symbolBot);

Distance altitudeDifference = intruderPos->altitude - gaugeCenterPos->altitude;
int altDiffHundredsFtPerMin = (int) std::round(altitudeDifference.toFeet() / 100.0);
int altDiffHundredsFtPerMin = (int) round(altitudeDifference.toFeet() / 100.0);

vsitextureconstants::TexCoords const * signChar = altDiffHundredsFtPerMin < 0.0 ? &vsitextureconstants::K_CHAR_MINUS_SIGN : &vsitextureconstants::K_CHAR_PLUS_SIGN;
altDiffHundredsFtPerMin = abs(altDiffHundredsFtPerMin);
Expand Down
5 changes: 1 addition & 4 deletions src/data/Location.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ namespace xplane{
}

int getSize() {
<<<<<<< HEAD
BuildPlane();
=======
>>>>>>> 934d9e673c4b28f30c9f6029b944dea13a5b9185

char const *c = plane.c_str();
size_t length = strlen(c);
return length;
Expand Down
Loading

0 comments on commit 72bf497

Please sign in to comment.