Merge branch 'release-1.0.1' into develop
Conflicts: C/src/xplaneConnect.c MATLAB/+XPlaneConnect/XPlaneConnect.jar MATLAB/+XPlaneConnect/sendDREF.m xpcPlugin/XPlaneConnect/mac.xpl
This commit is contained in:
@@ -48,6 +48,10 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
int sendUDP(XPCSocket sock, char buffer[], int len);
|
||||||
|
int readUDP(XPCSocket sock, char buffer[], int len);
|
||||||
|
int sendDREFRequest(XPCSocket sock, const char* drefs[], unsigned char count);
|
||||||
|
int getDREFResponse(XPCSocket sock, float* values[], unsigned char count, int sizes[]);
|
||||||
void printError(char *functionName, char *format, ...)
|
void printError(char *functionName, char *format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
@@ -112,7 +116,7 @@ XPCSocket aopenUDP(const char *xpIP, unsigned short xpPort, unsigned short port)
|
|||||||
#else
|
#else
|
||||||
struct timeval timeout;
|
struct timeval timeout;
|
||||||
timeout.tv_sec = 0;
|
timeout.tv_sec = 0;
|
||||||
timeout.tv_usec = 1000;
|
timeout.tv_usec = 100000;
|
||||||
#endif
|
#endif
|
||||||
if (setsockopt(sock.sock, SOL_SOCKET, SO_RCVTIMEO, (char*)&timeout, sizeof(timeout)) < 0)
|
if (setsockopt(sock.sock, SOL_SOCKET, SO_RCVTIMEO, (char*)&timeout, sizeof(timeout)) < 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,6 +22,10 @@ socket.close;
|
|||||||
|
|
||||||
%% Track open clients
|
%% Track open clients
|
||||||
global clients;
|
global clients;
|
||||||
%TODO: Remove stale clients
|
for i = 1:length(clients)
|
||||||
|
if socket == clients(i)
|
||||||
|
clients = [clients(1:i-1) clients(i+1:length(clients))];
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -15,4 +15,5 @@ if ~exist('socket', 'var')
|
|||||||
sendDREFs(dref, value)
|
sendDREFs(dref, value)
|
||||||
else
|
else
|
||||||
sendDREFs(dref, value, socket)
|
sendDREFs(dref, value, socket)
|
||||||
end
|
end
|
||||||
|
socket.sendDREF(dref, value);
|
||||||
@@ -133,7 +133,7 @@ namespace XPC
|
|||||||
DREF_MP4Alt,
|
DREF_MP4Alt,
|
||||||
DREF_MP5Alt,
|
DREF_MP5Alt,
|
||||||
DREF_MP6Alt,
|
DREF_MP6Alt,
|
||||||
DREF_MP7Alt,
|
DREF_MP7Alt
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Maps X-Plane dataref lines to XPC DREF values.
|
/// Maps X-Plane dataref lines to XPC DREF values.
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
0
xpcPlugin/XPlaneConnect/mac.xpl
Executable file → Normal file
0
xpcPlugin/XPlaneConnect/mac.xpl
Executable file → Normal file
Binary file not shown.
@@ -207,7 +207,8 @@
|
|||||||
D607B16309A5563100699BC3 /* Debug */ = {
|
D607B16309A5563100699BC3 /* Debug */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "c++98";
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
CONFIGURATION_BUILD_DIR = ./XPlaneConnect;
|
CONFIGURATION_BUILD_DIR = ./XPlaneConnect;
|
||||||
DYLIB_COMPATIBILITY_VERSION = "";
|
DYLIB_COMPATIBILITY_VERSION = "";
|
||||||
@@ -246,7 +247,7 @@
|
|||||||
PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = YES;
|
PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = YES;
|
||||||
PRODUCT_NAME = "${TARGET_NAME}";
|
PRODUCT_NAME = "${TARGET_NAME}";
|
||||||
SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = NO;
|
SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = NO;
|
||||||
SDKROOT = macosx10.8;
|
SDKROOT = macosx;
|
||||||
SYMROOT = build;
|
SYMROOT = build;
|
||||||
XPSDK_ROOT = SDK;
|
XPSDK_ROOT = SDK;
|
||||||
};
|
};
|
||||||
@@ -255,9 +256,10 @@
|
|||||||
D607B16409A5563100699BC3 /* Release */ = {
|
D607B16409A5563100699BC3 /* Release */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "c++98";
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
CONFIGURATION_BUILD_DIR = ./Mac;
|
CONFIGURATION_BUILD_DIR = ./XPlaneConnect;
|
||||||
DYLIB_COMPATIBILITY_VERSION = "";
|
DYLIB_COMPATIBILITY_VERSION = "";
|
||||||
DYLIB_CURRENT_VERSION = "";
|
DYLIB_CURRENT_VERSION = "";
|
||||||
EXECUTABLE_EXTENSION = xpl;
|
EXECUTABLE_EXTENSION = xpl;
|
||||||
@@ -293,7 +295,7 @@
|
|||||||
PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = YES;
|
PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = YES;
|
||||||
PRODUCT_NAME = "${TARGET_NAME}";
|
PRODUCT_NAME = "${TARGET_NAME}";
|
||||||
SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = NO;
|
SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = NO;
|
||||||
SDKROOT = macosx10.8;
|
SDKROOT = macosx;
|
||||||
SYMROOT = build;
|
SYMROOT = build;
|
||||||
XPSDK_ROOT = SDK;
|
XPSDK_ROOT = SDK;
|
||||||
};
|
};
|
||||||
@@ -331,6 +333,7 @@
|
|||||||
);
|
);
|
||||||
MACH_O_TYPE = mh_bundle;
|
MACH_O_TYPE = mh_bundle;
|
||||||
PRODUCT_NAME = mac;
|
PRODUCT_NAME = mac;
|
||||||
|
SDKROOT = macosx;
|
||||||
STRIP_INSTALLED_PRODUCT = YES;
|
STRIP_INSTALLED_PRODUCT = YES;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
VERSION_INFO_PREFIX = XPC;
|
VERSION_INFO_PREFIX = XPC;
|
||||||
@@ -368,7 +371,9 @@
|
|||||||
"$(USER_LIBRARY_DIR)/Developer/Xcode/DerivedData/xplaneConnect-asdjuezcjkhojuewbyxhyhabxfwc/Build/Products/Debug",
|
"$(USER_LIBRARY_DIR)/Developer/Xcode/DerivedData/xplaneConnect-asdjuezcjkhojuewbyxhyhabxfwc/Build/Products/Debug",
|
||||||
);
|
);
|
||||||
MACH_O_TYPE = mh_bundle;
|
MACH_O_TYPE = mh_bundle;
|
||||||
|
ONLY_ACTIVE_ARCH = NO;
|
||||||
PRODUCT_NAME = mac;
|
PRODUCT_NAME = mac;
|
||||||
|
SDKROOT = macosx;
|
||||||
STRIP_INSTALLED_PRODUCT = YES;
|
STRIP_INSTALLED_PRODUCT = YES;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
VERSION_INFO_PREFIX = XPC;
|
VERSION_INFO_PREFIX = XPC;
|
||||||
|
|||||||
Reference in New Issue
Block a user