Style, Analyze
This commit is contained in:
parent
3b2f146679
commit
0fe7335987
@ -25,6 +25,7 @@ ContinuationIndentWidth: 4
|
|||||||
Cpp11BracedListStyle: true
|
Cpp11BracedListStyle: true
|
||||||
DerivePointerBinding: false
|
DerivePointerBinding: false
|
||||||
ExperimentalAutoDetectBinPacking: false
|
ExperimentalAutoDetectBinPacking: false
|
||||||
|
IndentAccessModifiers: true
|
||||||
IndentCaseLabels: true
|
IndentCaseLabels: true
|
||||||
IndentFunctionDeclarationAfterType: true
|
IndentFunctionDeclarationAfterType: true
|
||||||
IndentWidth: 2
|
IndentWidth: 2
|
||||||
|
|||||||
17
.vscode/cmake-kits.json
vendored
Normal file
17
.vscode/cmake-kits.json
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
[{
|
||||||
|
"name": "Clang 13.0.0 Mac",
|
||||||
|
"toolchainFile": "${workspaceFolder}/toolchain-mac.cmake"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Clang 13.0.0 Linux",
|
||||||
|
"toolchainFile": "${workspaceFolder}/toolchain-lin.cmake"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Clang 13.0.0 Windows 32",
|
||||||
|
"toolchainFile": "${workspaceFolder}/toolchain-win-32.cmake"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Clang 13.0.0 Windows 64",
|
||||||
|
"toolchainFile": "${workspaceFolder}/toolchain-win-64.cmake"
|
||||||
|
}
|
||||||
|
]
|
||||||
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -1,8 +1,5 @@
|
|||||||
{
|
{
|
||||||
"cmake.generator": "Unix Makefiles",
|
"cmake.generator": "Unix Makefiles",
|
||||||
"cmake.configureArgs": [
|
|
||||||
"-DIBM=ON"
|
|
||||||
],
|
|
||||||
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
|
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
|
||||||
"files.associations": {
|
"files.associations": {
|
||||||
"cmath": "cpp"
|
"cmath": "cpp"
|
||||||
|
|||||||
@ -8,6 +8,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|||||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
||||||
set(CMAKE_BUILD_WITH_INSTALL_NAME_DIR TRUE)
|
set(CMAKE_BUILD_WITH_INSTALL_NAME_DIR TRUE)
|
||||||
|
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
|
||||||
set(PLUGIN_NAME GAConnector)
|
set(PLUGIN_NAME GAConnector)
|
||||||
|
|
||||||
option(DEBUG "Debug symbols" OFF)
|
option(DEBUG "Debug symbols" OFF)
|
||||||
|
|||||||
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@ -17,7 +17,9 @@ pipeline {
|
|||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
sh 'bash ./build.sh win32'
|
sh 'bash ./build.sh win32'
|
||||||
|
sh 'analyze-build --verbose --cdb build/compile_commands.json --output build/Analysis/win32'
|
||||||
sh 'bash ./build.sh win64'
|
sh 'bash ./build.sh win64'
|
||||||
|
sh 'analyze-build --verbose --cdb build/compile_commands.json --output build/Analysis/win64'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Build Linux Debug') {
|
stage('Build Linux Debug') {
|
||||||
@ -36,7 +38,9 @@ pipeline {
|
|||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
sh 'bash ./build.sh lin32'
|
sh 'bash ./build.sh lin32'
|
||||||
|
sh 'analyze-build --verbose --cdb build/compile_commands.json --output build/Analysis/lin32'
|
||||||
sh 'bash ./build.sh lin64'
|
sh 'bash ./build.sh lin64'
|
||||||
|
sh 'analyze-build --verbose --cdb build/compile_commands.json --output build/Analysis/lin64'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Build MacOSX Debug') {
|
stage('Build MacOSX Debug') {
|
||||||
@ -55,6 +59,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
sh 'bash ./build.sh mac'
|
sh 'bash ./build.sh mac'
|
||||||
|
sh 'analyze-build --verbose --cdb build/compile_commands.json --output build/Analysis/mac'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Archive Debug') {
|
stage('Archive Debug') {
|
||||||
@ -63,6 +68,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
zip zipFile: 'Debug.zip', archive: true, dir: 'build/Plugin'
|
zip zipFile: 'Debug.zip', archive: true, dir: 'build/Plugin'
|
||||||
|
zip zipFile: 'Analysis.zip', archive: true, dir: 'build/Analysis'
|
||||||
sh 'rm -rf build'
|
sh 'rm -rf build'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,47 +15,48 @@
|
|||||||
class PathSegment
|
class PathSegment
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
std::uint16_t altitude = 0;
|
std::uint16_t altitude = 0;
|
||||||
std::uint16_t groundSpeed = 0;
|
std::uint16_t groundSpeed = 0;
|
||||||
double latitude = 0;
|
double latitude = 0;
|
||||||
double longitude = 0;
|
double longitude = 0;
|
||||||
std::vector<std::uint8_t> file;
|
std::vector<std::uint8_t> file;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PathSegment() = default;
|
PathSegment() = default;
|
||||||
PathSegment(std::uint16_t altitude,
|
PathSegment(std::uint16_t altitude,
|
||||||
std::uint16_t groundSpeed,
|
std::uint16_t groundSpeed,
|
||||||
double latitude,
|
double latitude,
|
||||||
double longitude)
|
double longitude)
|
||||||
{
|
{
|
||||||
this->altitude = altitude;
|
this->altitude = altitude;
|
||||||
this->groundSpeed = groundSpeed;
|
this->groundSpeed = groundSpeed;
|
||||||
this->latitude = latitude;
|
this->latitude = latitude;
|
||||||
this->longitude = longitude;
|
this->longitude = longitude;
|
||||||
|
|
||||||
file = std::vector<std::uint8_t>(20, 0);
|
file = std::vector<std::uint8_t>(20, 0);
|
||||||
std::uint8_t *bufPtr = file.data();
|
std::uint8_t *bufPtr = file.data();
|
||||||
memcpy(bufPtr, &this->altitude, sizeof(this->altitude));
|
memcpy(bufPtr, &this->altitude, sizeof(this->altitude));
|
||||||
bufPtr += sizeof(this->altitude);
|
bufPtr += sizeof(this->altitude);
|
||||||
memcpy(bufPtr, &this->groundSpeed, sizeof(this->groundSpeed));
|
memcpy(bufPtr, &this->groundSpeed, sizeof(this->groundSpeed));
|
||||||
bufPtr += sizeof(this->groundSpeed);
|
bufPtr += sizeof(this->groundSpeed);
|
||||||
memcpy(bufPtr, &this->latitude, sizeof(this->latitude));
|
memcpy(bufPtr, &this->latitude, sizeof(this->latitude));
|
||||||
bufPtr += sizeof(this->latitude);
|
bufPtr += sizeof(this->latitude);
|
||||||
memcpy(bufPtr, &this->longitude, sizeof(this->longitude));
|
memcpy(bufPtr, &this->longitude, sizeof(this->longitude));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::uint8_t *getBinaryData() { return file.data(); }
|
std::uint8_t *getBinaryData() { return file.data(); }
|
||||||
std::size_t getBinaryLength() { return file.size(); }
|
std::size_t getBinaryLength() { return file.size(); }
|
||||||
|
|
||||||
friend bool operator==(const PathSegment &lhs, const PathSegment &rhs)
|
friend bool operator==(const PathSegment &lhs, const PathSegment &rhs)
|
||||||
{
|
{
|
||||||
return lhs.altitude == rhs.altitude && lhs.groundSpeed == rhs.groundSpeed &&
|
return lhs.altitude == rhs.altitude &&
|
||||||
lhs.latitude == rhs.latitude && lhs.longitude == rhs.longitude;
|
lhs.groundSpeed == rhs.groundSpeed &&
|
||||||
}
|
lhs.latitude == rhs.latitude && lhs.longitude == rhs.longitude;
|
||||||
friend bool operator!=(const PathSegment &lhs, const PathSegment &rhs)
|
}
|
||||||
{
|
friend bool operator!=(const PathSegment &lhs, const PathSegment &rhs)
|
||||||
return !(lhs == rhs);
|
{
|
||||||
}
|
return !(lhs == rhs);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -10,20 +10,20 @@
|
|||||||
class Path
|
class Path
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
std::uint64_t count = 0;
|
std::uint64_t count = 0;
|
||||||
std::vector<std::uint8_t> file;
|
std::vector<std::uint8_t> file;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void addSegment(PathSegment segment)
|
void addSegment(PathSegment segment)
|
||||||
{
|
{
|
||||||
file.resize(file.size() + segment.getBinaryLength());
|
file.resize(file.size() + segment.getBinaryLength());
|
||||||
std::uint8_t *bufPtr = file.data() + count * segment.getBinaryLength();
|
std::uint8_t *bufPtr = file.data() + count * segment.getBinaryLength();
|
||||||
memcpy(bufPtr, segment.getBinaryData(), segment.getBinaryLength());
|
memcpy(bufPtr, segment.getBinaryData(), segment.getBinaryLength());
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::uint8_t *getBinaryData() { return file.data(); }
|
std::uint8_t *getBinaryData() { return file.data(); }
|
||||||
std::size_t getBinaryLength() { return file.size(); }
|
std::size_t getBinaryLength() { return file.size(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@ -6,7 +6,7 @@ add_library(makerwysxp SHARED
|
|||||||
|
|
||||||
target_include_directories(makerwysxp PRIVATE
|
target_include_directories(makerwysxp PRIVATE
|
||||||
${CMAKE_SOURCE_DIR}/makerwysxp/include
|
${CMAKE_SOURCE_DIR}/makerwysxp/include
|
||||||
${CMAKE_SOURCE_DIR}/file
|
${CMAKE_SOURCE_DIR}/utilities/include
|
||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties(makerwysxp PROPERTIES
|
set_target_properties(makerwysxp PROPERTIES
|
||||||
|
|||||||
@ -22,34 +22,35 @@
|
|||||||
class Gate
|
class Gate
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
std::string designator;
|
std::string designator;
|
||||||
double latitude;
|
double latitude;
|
||||||
double longitude;
|
double longitude;
|
||||||
std::vector<std::uint8_t> file;
|
std::vector<std::uint8_t> file;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Gate(const std::string &designator, double latitude, double longitude)
|
Gate(const std::string &designator, double latitude, double longitude)
|
||||||
{
|
{
|
||||||
|
|
||||||
this->designator = designator;
|
this->designator = designator;
|
||||||
this->latitude = latitude;
|
this->latitude = latitude;
|
||||||
this->longitude = longitude;
|
this->longitude = longitude;
|
||||||
|
|
||||||
file = std::vector<std::uint8_t>(18 + this->designator.length(), 0);
|
file = std::vector<std::uint8_t>(18 + this->designator.length(), 0);
|
||||||
std::uint8_t *bufPtr = file.data();
|
std::uint8_t *bufPtr = file.data();
|
||||||
memset(bufPtr,
|
memset(bufPtr,
|
||||||
static_cast<std::uint8_t>(this->designator.length()),
|
static_cast<std::uint8_t>(this->designator.length()),
|
||||||
sizeof(std::uint8_t));
|
sizeof(std::uint8_t));
|
||||||
bufPtr++; // Designator length
|
bufPtr++; // Designator length
|
||||||
memcpy(bufPtr, this->designator.c_str(), this->designator.length());
|
memcpy(bufPtr, this->designator.c_str(), this->designator.length());
|
||||||
bufPtr += this->designator.length() + 1; // Designator plus null termination
|
bufPtr +=
|
||||||
memcpy(bufPtr, &this->latitude, sizeof(this->latitude));
|
this->designator.length() + 1; // Designator plus null termination
|
||||||
bufPtr += 8; // Latitude
|
memcpy(bufPtr, &this->latitude, sizeof(this->latitude));
|
||||||
memcpy(bufPtr, &this->longitude, sizeof(this->longitude));
|
bufPtr += 8; // Latitude
|
||||||
}
|
memcpy(bufPtr, &this->longitude, sizeof(this->longitude));
|
||||||
|
}
|
||||||
|
|
||||||
std::uint8_t *getBinaryData() { return file.data(); }
|
std::uint8_t *getBinaryData() { return file.data(); }
|
||||||
std::size_t getBinaryLength() { return file.size(); }
|
std::size_t getBinaryLength() { return file.size(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@ -24,90 +24,91 @@
|
|||||||
class Runway
|
class Runway
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
std::string designator;
|
std::string designator;
|
||||||
double latitudeStart;
|
double latitudeStart;
|
||||||
double longitudeStart;
|
double longitudeStart;
|
||||||
std::uint8_t width;
|
std::uint8_t width;
|
||||||
std::uint16_t length;
|
std::uint16_t length;
|
||||||
std::uint16_t trueHeading;
|
std::uint16_t trueHeading;
|
||||||
std::vector<std::uint8_t> file;
|
std::vector<std::uint8_t> file;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Runway(std::string designator,
|
Runway(std::string designator,
|
||||||
double latitudeStart,
|
double latitudeStart,
|
||||||
double longitudeStart,
|
double longitudeStart,
|
||||||
double latitudeEnd,
|
double latitudeEnd,
|
||||||
double longitudeEnd,
|
double longitudeEnd,
|
||||||
double width)
|
double width)
|
||||||
{
|
{
|
||||||
this->designator = std::move(designator);
|
this->designator = std::move(designator);
|
||||||
this->latitudeStart = latitudeStart;
|
this->latitudeStart = latitudeStart;
|
||||||
this->longitudeStart = longitudeStart;
|
this->longitudeStart = longitudeStart;
|
||||||
this->width = (std::uint8_t)std::round(util::to_feet(width));
|
this->width = (std::uint8_t)std::round(util::to_feet(width));
|
||||||
double dist = util::distanceEarth(latitudeStart,
|
double dist = util::distanceEarth(latitudeStart,
|
||||||
longitudeStart,
|
longitudeStart,
|
||||||
latitudeEnd,
|
latitudeEnd,
|
||||||
longitudeEnd);
|
longitudeEnd);
|
||||||
this->length = (std::uint16_t)std::round(util::to_feet(dist));
|
this->length = (std::uint16_t)std::round(util::to_feet(dist));
|
||||||
this->trueHeading = (std::uint16_t)std::round(util::bearing(latitudeStart,
|
this->trueHeading =
|
||||||
longitudeStart,
|
(std::uint16_t)std::round(util::bearing(latitudeStart,
|
||||||
latitudeEnd,
|
longitudeStart,
|
||||||
longitudeEnd));
|
latitudeEnd,
|
||||||
|
longitudeEnd));
|
||||||
|
|
||||||
file = std::vector<std::uint8_t>(23 + this->designator.length(), 0);
|
file = std::vector<std::uint8_t>(23 + this->designator.length(), 0);
|
||||||
std::uint8_t *bufPtr = file.data();
|
std::uint8_t *bufPtr = file.data();
|
||||||
memset(bufPtr,
|
memset(bufPtr,
|
||||||
static_cast<std::uint8_t>(this->designator.length()),
|
static_cast<std::uint8_t>(this->designator.length()),
|
||||||
sizeof(std::uint8_t));
|
sizeof(std::uint8_t));
|
||||||
bufPtr++;
|
bufPtr++;
|
||||||
memcpy(bufPtr, this->designator.c_str(), this->designator.length());
|
memcpy(bufPtr, this->designator.c_str(), this->designator.length());
|
||||||
bufPtr += this->designator.length() + 1;
|
bufPtr += this->designator.length() + 1;
|
||||||
memcpy(bufPtr, &this->latitudeStart, sizeof(this->latitudeStart));
|
memcpy(bufPtr, &this->latitudeStart, sizeof(this->latitudeStart));
|
||||||
bufPtr += sizeof(this->latitudeStart);
|
bufPtr += sizeof(this->latitudeStart);
|
||||||
memcpy(bufPtr, &this->longitudeStart, sizeof(this->longitudeStart));
|
memcpy(bufPtr, &this->longitudeStart, sizeof(this->longitudeStart));
|
||||||
bufPtr += sizeof(this->longitudeStart);
|
bufPtr += sizeof(this->longitudeStart);
|
||||||
memcpy(bufPtr, &this->width, sizeof(this->width));
|
memcpy(bufPtr, &this->width, sizeof(this->width));
|
||||||
bufPtr += sizeof(this->width);
|
bufPtr += sizeof(this->width);
|
||||||
memcpy(bufPtr, &this->length, sizeof(this->length));
|
memcpy(bufPtr, &this->length, sizeof(this->length));
|
||||||
bufPtr += sizeof(this->length);
|
bufPtr += sizeof(this->length);
|
||||||
memcpy(bufPtr, &this->trueHeading, sizeof(this->trueHeading));
|
memcpy(bufPtr, &this->trueHeading, sizeof(this->trueHeading));
|
||||||
}
|
}
|
||||||
|
|
||||||
Runway(std::string designator,
|
Runway(std::string designator,
|
||||||
double latitudeStart,
|
double latitudeStart,
|
||||||
double longitudeStart,
|
double longitudeStart,
|
||||||
std::uint8_t width,
|
std::uint8_t width,
|
||||||
std::uint16_t length,
|
std::uint16_t length,
|
||||||
std::uint16_t trueHeading)
|
std::uint16_t trueHeading)
|
||||||
{
|
{
|
||||||
this->designator = std::move(designator);
|
this->designator = std::move(designator);
|
||||||
this->latitudeStart = latitudeStart;
|
this->latitudeStart = latitudeStart;
|
||||||
this->longitudeStart = longitudeStart;
|
this->longitudeStart = longitudeStart;
|
||||||
this->width = width;
|
this->width = width;
|
||||||
this->length = length;
|
this->length = length;
|
||||||
this->trueHeading = trueHeading;
|
this->trueHeading = trueHeading;
|
||||||
|
|
||||||
file = std::vector<std::uint8_t>(23 + this->designator.length(), 0);
|
file = std::vector<std::uint8_t>(23 + this->designator.length(), 0);
|
||||||
std::uint8_t *bufPtr = file.data();
|
std::uint8_t *bufPtr = file.data();
|
||||||
memset(bufPtr,
|
memset(bufPtr,
|
||||||
static_cast<std::uint8_t>(this->designator.length()),
|
static_cast<std::uint8_t>(this->designator.length()),
|
||||||
sizeof(std::uint8_t));
|
sizeof(std::uint8_t));
|
||||||
bufPtr++;
|
bufPtr++;
|
||||||
memcpy(bufPtr, this->designator.c_str(), this->designator.length());
|
memcpy(bufPtr, this->designator.c_str(), this->designator.length());
|
||||||
bufPtr += this->designator.length() + 1;
|
bufPtr += this->designator.length() + 1;
|
||||||
memcpy(bufPtr, &this->latitudeStart, sizeof(this->latitudeStart));
|
memcpy(bufPtr, &this->latitudeStart, sizeof(this->latitudeStart));
|
||||||
bufPtr += sizeof(this->latitudeStart);
|
bufPtr += sizeof(this->latitudeStart);
|
||||||
memcpy(bufPtr, &this->longitudeStart, sizeof(this->longitudeStart));
|
memcpy(bufPtr, &this->longitudeStart, sizeof(this->longitudeStart));
|
||||||
bufPtr += sizeof(this->longitudeStart);
|
bufPtr += sizeof(this->longitudeStart);
|
||||||
memcpy(bufPtr, &this->width, sizeof(this->width));
|
memcpy(bufPtr, &this->width, sizeof(this->width));
|
||||||
bufPtr += sizeof(this->width);
|
bufPtr += sizeof(this->width);
|
||||||
memcpy(bufPtr, &this->length, sizeof(this->length));
|
memcpy(bufPtr, &this->length, sizeof(this->length));
|
||||||
bufPtr += sizeof(this->length);
|
bufPtr += sizeof(this->length);
|
||||||
memcpy(bufPtr, &this->trueHeading, sizeof(this->trueHeading));
|
memcpy(bufPtr, &this->trueHeading, sizeof(this->trueHeading));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::uint8_t *getBinaryData() { return file.data(); }
|
std::uint8_t *getBinaryData() { return file.data(); }
|
||||||
std::size_t getBinaryLength() { return file.size(); }
|
std::size_t getBinaryLength() { return file.size(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@ -20,17 +20,17 @@
|
|||||||
class Socket
|
class Socket
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
char lastPath[513] = "";
|
char lastPath[513] = "";
|
||||||
char lastHash[2 * MD5LEN + 1] = "";
|
char lastHash[2 * MD5LEN + 1] = "";
|
||||||
std::mutex wsLock;
|
std::mutex wsLock;
|
||||||
std::string url;
|
std::string url;
|
||||||
std::function<void(std::string)> toLog;
|
std::function<void(std::string)> toLog;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit Socket(std::string url,
|
explicit Socket(std::string url,
|
||||||
std::function<void(const std::string)> toLog);
|
std::function<void(const std::string)> toLog);
|
||||||
~Socket();
|
~Socket();
|
||||||
void sendData(data d);
|
void sendData(data d);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -5,24 +5,24 @@
|
|||||||
|
|
||||||
/* Structures and enums */
|
/* Structures and enums */
|
||||||
typedef struct data {
|
typedef struct data {
|
||||||
std::int32_t pause = 0;
|
std::int32_t pause = 0;
|
||||||
float pBrake = 0;
|
float pBrake = 0;
|
||||||
std::int32_t onGrnd = 0;
|
std::int32_t onGrnd = 0;
|
||||||
float totFuelKg = 0;
|
float totFuelKg = 0;
|
||||||
float truHdg = 0;
|
float truHdg = 0;
|
||||||
double alt = 0;
|
double alt = 0;
|
||||||
float gs = 0;
|
float gs = 0;
|
||||||
float ias = 0;
|
float ias = 0;
|
||||||
float vs = 0;
|
float vs = 0;
|
||||||
double lat = 0;
|
double lat = 0;
|
||||||
double lon = 0;
|
double lon = 0;
|
||||||
float ff[8] = {0, 0, 0, 0, 0, 0, 0, 0};
|
float ff[8] = {0, 0, 0, 0, 0, 0, 0, 0};
|
||||||
float maxSpd = 0;
|
float maxSpd = 0;
|
||||||
char path[513] = "";
|
char path[513] = "";
|
||||||
float uptime = 0;
|
float uptime = 0;
|
||||||
float magHeading = 0;
|
float magHeading = 0;
|
||||||
float payloadKg = 0;
|
float payloadKg = 0;
|
||||||
float totalWeightKg = 0;
|
float totalWeightKg = 0;
|
||||||
} data;
|
} data;
|
||||||
|
|
||||||
typedef enum commands {
|
typedef enum commands {
|
||||||
@ -38,16 +38,16 @@ typedef enum commands {
|
|||||||
} commands;
|
} commands;
|
||||||
|
|
||||||
typedef struct command_base {
|
typedef struct command_base {
|
||||||
commands type;
|
commands type;
|
||||||
} command_base;
|
} command_base;
|
||||||
|
|
||||||
#pragma pack(push) /* push current alignment to stack */
|
#pragma pack(push) /* push current alignment to stack */
|
||||||
#pragma pack(1) /* set alignment to 1 byte boundary */
|
#pragma pack(1) /* set alignment to 1 byte boundary */
|
||||||
|
|
||||||
typedef struct command_port {
|
typedef struct command_port {
|
||||||
double latitude;
|
double latitude;
|
||||||
double longitude;
|
double longitude;
|
||||||
float trueHeading;
|
float trueHeading;
|
||||||
} command_port;
|
} command_port;
|
||||||
|
|
||||||
#pragma pack(pop) /* restore original alignment from stack */
|
#pragma pack(pop) /* restore original alignment from stack */
|
||||||
|
|||||||
@ -10,8 +10,9 @@ add_library(germanairlinesva_xplugin SHARED
|
|||||||
target_include_directories(germanairlinesva_xplugin PRIVATE
|
target_include_directories(germanairlinesva_xplugin PRIVATE
|
||||||
${CMAKE_SOURCE_DIR}/makerwysxp/include
|
${CMAKE_SOURCE_DIR}/makerwysxp/include
|
||||||
${CMAKE_SOURCE_DIR}/socket/include
|
${CMAKE_SOURCE_DIR}/socket/include
|
||||||
|
${CMAKE_SOURCE_DIR}/utilities/include
|
||||||
|
${CMAKE_SOURCE_DIR}/nlohmann/include
|
||||||
${CMAKE_SOURCE_DIR}/XPSDK/CHeaders
|
${CMAKE_SOURCE_DIR}/XPSDK/CHeaders
|
||||||
${CMAKE_SOURCE_DIR}/nlohmann
|
|
||||||
${CMAKE_SOURCE_DIR}/file
|
${CMAKE_SOURCE_DIR}/file
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -151,6 +151,12 @@ PLUGIN_API int XPluginStart(char *outName, char *outSig, char *outDesc)
|
|||||||
recordingThread = std::thread(&recordingWorker);
|
recordingThread = std::thread(&recordingWorker);
|
||||||
toLog("Workers started");
|
toLog("Workers started");
|
||||||
|
|
||||||
|
for (int i = 0; i < 10000; i++) {
|
||||||
|
char *t = (char *)calloc(sizeof(char), 11);
|
||||||
|
memcpy(t, "Take 10Bit", 10);
|
||||||
|
toLog(t);
|
||||||
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user