Commit Graph

38 Commits

Author SHA1 Message Date
Jason Watkins
4e7e816da1 Cleaned up DATA related functions.
- Tweaked signatures to improve consistency and safety.
 - Improved error logging.
 - Removed parseDATA. When merged into readDATA, the meat of parseDATA is only a few lines of code.
2015-04-17 10:56:00 -07:00
Jason Watkins
9f670954cc Cleaned up setCONN and pauseSim functions.
- Tweaked function signatures to more accurately reflect internal behavior.
 - Changed behavior of setCONN to use the inbound port of the socket passed to it.
 - Greatly enhanced error reporting for setCONN and pauseSim.
2015-04-17 10:55:59 -07:00
Jason Watkins
1a8078af87 Various changes to improve consistency and readability of low level UDP functions.
- Tweaked variable names to be more concise.
 - Moved variable declarations from top of function to point of use.
 - Replaced memcpy with strncpy where appropriate.
 - Removed socket reuse options on *nix builds.
 - Improved error reporting.
 - Most failures when opening and closing sockets now cause the client to die.
 - sendUDP now ignores the length byte.
2015-04-17 10:55:59 -07:00
Jason Watkins
a6196dece9 C client style tweaks.
- Standardized C client to use tabs.
 - Improved consistency of indentation.
 - Updated copyright and description headers.
2015-04-17 10:54:55 -07:00
Jason Watkins
6417822a75 Added C test for WYPT command and fixed bugs in parseWYPT and sendWYPT. 2015-04-09 12:17:52 -07:00
Jason Watkins
1a83517bee Implemented plugin support for handling WYPT commands. 2015-04-09 12:17:41 -07:00
Jason Watkins
001d5fd2d4 Quick fix to installation instructions in User Guide (C).txt 2015-04-08 09:37:19 -07:00
Chris Teubert
335570f34f Updated C User Guide 2015-04-08 09:26:56 -07:00
Chris Teubert
efc591ead4 Added missing return 2015-04-08 09:12:56 -07:00
Chris Teubert
b7dfb8ec3e Bug fix
Fixed function prototype in header (didn’t match source file)
2015-04-08 09:12:56 -07:00
Jason Watkins
46913596c5 Added support for the TEXT command to the C client. 2015-04-07 15:33:46 -07:00
Jason Watkins
abf2a426d2 Added C client support for multiplayer sendCTRL commands. 2015-04-07 10:43:39 -07:00
Jason Watkins
a05ddb42be Modified parseCTRL and readCTRL to return a struct.
- Defined a new struct that contains the information sent by the CTRL command
 - Added some additional validation to parseCTRL.
 - Changed the return type of parseCTRL and removed now redundant pointer parameters.
 - Propagated return type change throughout the plugin code base.
2015-04-07 10:38:57 -07:00
Chris Teubert
0c2e786890 Removed "sim/" auto add feature
Removed “sim/“ auto add feature. There are some drefs (custom/art) that
do not start with “sim/“
2015-04-03 10:47:55 -07:00
Chris Teubert
5d50d970bd sendCTRL Bug
Fixed bug where sendCTRL is sending gear as float. Changed to char as
specified in ICD.
2015-04-01 15:58:01 -07:00
Jason Watkins
85fdcbe3dc Several small fixes
- Added Visual Studio solution for C client example.
 - Fixed inconsistent indentation in C client example.
 - Changed default behavior in MATLAB client's sendCTRL function to leave unchanged instead of setting default values.
 - Fixed sendPOSI and sendDATA sections of the MATLAB example.
 - Fixed port number in the C and C++ setCONN tests.
2015-03-30 13:38:51 -07:00
Jason Watkins
b91776e687 Removed files that were previously in version control that should be ignored. 2015-03-25 11:32:40 -07:00
Jason Watkins
66b074d89b Tweaks to fix setCONNTest on Windows 8
- Temporarily disabled the sending of a CONF message from the plugin in response to setCONN. The CONF message causes crashes on Windows 8 when setCONN is called multiple times.
 -  Removed code that attempted to free result slots in parseRequest before overwritting them with new allocations. The CTests suite currently calls parseRequest with a multidimensional array allocated on the stack, resulting in an attempt to free stack memory. A better solution may be to simply check whether the existing result slots are long enough.
 - As of this commit, all tests in the CTests suite are passing on Windows 8 for X-Plane 9, X-Plane 10 23bit and X-Plane 10 64bit.
2015-03-24 16:11:37 -07:00
Jason Watkins
fbeb297717 Fixed CTests bugs, minor plugin enhancements, and removed old files
- Fixed incorrect message buffer size in sendCTRL function.
 - Fixed a bug in sendCTRLTest where not all DREF sizes were being set.
 - Increased message buffer size in sendReadTest to account for assumptions made by sendUDP.
 - Fixed a bug in updateLog where the log message would sometimes start with several null characters, causing the log message to be effectively ignored by fprintf.

 - The xpcPlugin Visual Studio solution now supports 32 bit and 64 bit builds.
 - Logging performed by the plugin now works correctly on Windows.
 - Long log messages are now truncated to 500 characters. Previously, messages over 500 characters would be omitted, and an error message logged in their place.

 - Several files which were incorrectly added to source control have been deleted.
2015-03-24 14:29:39 -07:00
Elvis Dowson
5853062402 C/xpcExample: Update XCode project to reference new source file location.
This commit:
- updates the XCode project to 6.1.1
- updates the reference to the xpcExample source file
- modifies the project so that some of the files that are copied across during the build phase are
  only done during deployment.

Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com>
2015-01-02 14:45:36 +04:00
Elvis Dowson
b3fada3c64 C/xpcExample: Add CMake support for building xpcExample that uses the xplaneconnect library.
Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com>
2015-01-02 14:24:34 +04:00
Elvis Dowson
6709765a48 C/xpcExample: Move sources to src sub-folder.
Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com>
2015-01-02 14:23:02 +04:00
Elvis Dowson
ba0600ee68 xplaneconnect: Add CMake support for building xplaneconnect shared and static library.
Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com>
2015-01-02 14:20:00 +04:00
Elvis Dowson
0b7ad8809d User Guide(C).txt: Remove trailing whitespaces.
Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com>
2015-01-02 14:19:07 +04:00
jwatkins42
97b9c9a682 Fixed memory leak and incorrect copy bugs.
- The result of a call to realloc was erroneously thrown away, creating a potential memory leak.
 - Values were being copied to an array on the stack, then memcpy'ed into an array on the heap. Since the heap array is freshly allocated, it should be completely safe to memcpy the data directly into it.
 - The inner loop was copying the same value several times, rather than copying several values in series.
2014-12-08 22:17:55 -08:00
Chris Teubert
a396088ed8 Removed unnecessary use of pointer in parseDATA 2014-12-04 10:35:24 -08:00
Chris Teubert
dcce37573f Quick fix- msTimeOut to usTimeOut 2014-12-03 10:26:01 -08:00
jwatkins42
d70148b98d Reverted timeout changes and added clarifying comment. 2014-12-02 21:32:45 -08:00
jwatkins42
f582d7fec0 Removed duplicate socket initialization and corrected timeout values. 2014-12-02 21:01:52 -08:00
Chris Teubert
2f6bc72825 Fixed Buffer overrun in sendCTRL 2014-12-02 10:07:41 -08:00
Chris Teubert
851cebeea0 Testing improvements- C/C++ 2014-12-01 15:36:37 -08:00
Chris Teubert
9ea7011bfb Fixed bug in xplaneConnect.c
Fixed bug in openUDP where sockets could not be reopened in OS X
2014-12-01 14:44:06 -08:00
Chris Teubert
e36dcbb693 Minor fix for requestDREF
Fix for requestDREF
2014-11-28 10:05:56 -08:00
Chris Teubert
678b04491d Documentation/Version Number Changes 2014-11-24 12:29:40 -08:00
Chris Teubert
e4fed91077 Documentation Changes 2014-11-24 12:15:57 -08:00
Chris Teubert
28a9d7573a Updated Example - IP Address
Changed IP to 127.0.0.1
2014-11-24 12:13:38 -08:00
Chris Teubert
205e2998f4 User Guide Typo
Fix typo in C User Guide
2014-11-21 14:22:45 -08:00
Chris Teubert
8013ce1003 Initial Version 2014-10-22 15:52:38 -07:00