Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
#####################################
# Linux with GCC
build-lin:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
env:
platform: lin
steps:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1620"
version = "1.7">
version = "2.0">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
Expand Down Expand Up @@ -35,15 +35,13 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
askForAppToLaunch = "Yes"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<PathRunnable
runnableDebuggingMode = "0"
FilePath = "/Users/birger/Applications/X-Plane/12/X-Plane.app">
</PathRunnable>
allowLocationSimulation = "YES"
launchAutomaticallySubstyle = "2">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
19 changes: 12 additions & 7 deletions LTAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,7 @@ iBulkAc(numBulkAc < 1 ? 1 : numBulkAc > 100 ? 100 : numBulkAc),
vBulkNum (new LTAPIAircraft::LTAPIBulkData[iBulkAc]),
vInfoTexts(new LTAPIAircraft::LTAPIBulkInfoTexts[iBulkAc]),
pfCreateAcObject(_pfCreateAcObject)
{
// Create the shared dataRefs to access camera aircraft event notifications
XPLMShareData(SDR_CAMERA_MODES_ID, xplmType_Int, nullptr, nullptr);
XPLMShareData(SDR_CAMERA_TCAS_IDX, xplmType_Int, (XPLMDataChanged_f)(&LTAPIConnect::CameraSharedDataCB), this);
}
{}

LTAPIConnect::~LTAPIConnect()
{
Expand Down Expand Up @@ -407,6 +403,15 @@ std::chrono::system_clock::time_point LTAPIConnect::getLTSimTimePoint ()

const MapLTAPIAircraft& LTAPIConnect::UpdateAcList (ListLTAPIAircraft* plistRemovedAc)
{
// One-time init that needs to be done before the first aircraft is created
static bool bOneTimeInitDone = false;
if (!bOneTimeInitDone) {
// Create the shared dataRefs to access camera aircraft event notifications
XPLMShareData(SDR_CAMERA_MODES_ID, xplmType_Int, nullptr, nullptr);
XPLMShareData(SDR_CAMERA_TCAS_IDX, xplmType_Int, (XPLMDataChanged_f)(&LTAPIConnect::CameraSharedDataCB), this);
bOneTimeInitDone = true;
}

// These are the bulk input/output dataRefs in LiveTraffic,
// with which we fetch mass data from LiveTraffic
static LTDataRef DRquick("livetraffic/bulk/quick");
Expand Down Expand Up @@ -507,8 +512,8 @@ SPtrLTAPIAircraft LTAPIConnect::getAcInCameraView() const
}


// LTAPIConnect::Clear camera information, ie. delcare that no aircraft is currently being viewed
void clearCameraInfo ()
// Clear camera information, ie. delcare that no aircraft is currently being viewed
void LTAPIConnect::clearCameraInfo ()
{
LTAPI::setCameraAcDataRefs(0, 0);
}
Expand Down
Loading