Commit Graph

78 Commits

Author SHA1 Message Date
Chris Teubert
7c58c627ff Minor fixes and Mac Binary
- Added Mac Binary
- Fixed missing returns in PosiTests.h
- Fixed bug in DataManager where FormatLine was being sent a string
instead of a c string
- Increased mac timeout
2015-08-20 09:17:19 -07:00
Jason Watkins
d446b18d55 Merge branch 'monitor-example' into develop
Conflicts:
	Python/xplaneConnect.pyproj
2015-08-17 09:28:32 -07:00
Jason Watkins
b4d1a8a980 Added playback example to C client 2015-07-30 08:51:38 -07:00
Jason Watkins
d045e649b5 Simplified example to allow for cross platform compatibility. 2015-06-19 09:37:20 -07:00
Jason Watkins
337182f241 Fleshed out monitor example 2015-06-19 08:44:57 -07:00
Jason Watkins
9359a93068 Created basic example that continuously prints the player aircraft's position. 2015-06-19 08:44:56 -07:00
Jason Watkins
0b562d1fce Added getPOSI and getCTRL support to the C client. 2015-06-02 14:28:36 -07:00
Jason Watkins
05e0deeb0a Fixed bug in C client WYPT command. 2015-05-14 14:41:53 -07:00
Jason Watkins
238c82454c 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
2015-05-14 13:20:15 -07:00
Chris Teubert
d211c00384 Fixed timout time for Mac Client 2015-05-14 09:10:00 -07:00
Jason Watkins
579cad0655 Added support for VIEW command to the C client. 2015-05-08 14:38:31 -07:00
Jason Watkins
f2e64a30f2 Added support for sending multiple datarefs to the C client. 2015-05-07 15:24:57 -07:00
Chris Teubert
a1395d2e97 Added prototypes for functions not in header 2015-05-05 13:11:17 -07:00
Jason Watkins
c6f9669e36 Added support for setting speed brakes to C client. 2015-05-05 13:04:08 -07:00
Jason Watkins
aeceb87f1d Merge latest changes from release-1.0.1
Removing all C++11 features touches many parts of many files, so better merge the changes into develop ASAP to prevent future conflicts.
2015-05-05 08:33:54 -07:00
Jason Watkins
8ed6b39779 Increased the timeout for select in the C client on Windows. 2015-05-04 14:58:55 -07:00
Chris Teubert
c44f521842 pauseSim should be returning int on error 2015-05-04 10:30:10 -07:00
Jason Watkins
0b984c3d49 Updated C client to support "switch" argument in SIMU command. 2015-05-01 14:55:36 -07:00
Jason Watkins
472ed4feac Added check to beginning of C example to ensure that the client is connected to X-Plane. 2015-05-01 14:20:44 -07:00
Jason Watkins
902aa006e8 Updated C client socket timeout.
The C client previously set a very short read timeout because it was required
 by the plugin. To compensate for this on the client side, we would try to
read several times in a loop. Since the plugin no longer uses the C client for
networking, we can do away with the loops and set a proper timeout.
2015-04-30 09:04:32 -07:00
Chris Teubert
761ee793ba Updates to use new function names 2015-04-29 13:57:50 -07:00
Jason Watkins
54368bb65a C client API tweaks
- Swaped names of openUDP and aopenUDP.
 - openUDP is now the "automatic" version, requiring only the X-Plane IP address.
 - aopenUDP is now the "advanced" version, requiring both the X-Plane port and a client port.
 - Added support for passing NULL to sendTEXT.
2015-04-29 12:44:19 -07:00
Jason Watkins
3b2e697158 Removed 'p' variants of the sendCTRL and sendPOSI functions from the C client. 2015-04-29 08:14:55 -07:00
Jason Watkins
8932edbd67 Renamed "setDREF" function back to "sendDREF". 2015-04-28 12:10:53 -07:00
Chris Teubert
3c43517e44 Fix Bug in getDREF Response
Fix Bug- readUDP loop in getDREF Response only ran once no matter what.
This wasn’t enough time for the plugin to send a response.

Note: You can try increasing the timeout, but the plugin has to have a
socket with a timeout of 1ms or less. If the timeout is higher than
that a lag is introduced.
2015-04-28 12:10:33 -07:00
Jason Watkins
d1df7f7b89 Deleted out of date user guides. The GitHub wiki now provides the information previously contained in these guides. 2015-04-28 12:04:42 -07:00
Chris Teubert
c2ab55e2d0 Fix sendTEXT bug
sendText using the number 40 instead of message length in sendUDP call.
Messages would be cut off if longer than this
2015-04-24 11:00:53 -07:00
Jason Watkins
1d766dbb09 Updated C example program to conform to the new client API. 2015-04-24 10:30:29 -07:00
Jason Watkins
fe5689aaa2 Removed internal C client functions from the C client header. 2015-04-23 16:20:42 -07:00
Jason Watkins
7da82f40dc Several variable name tweaks and error checking changes.
- Minimal functional changes. The primary purpose of these tweaks is to make the clients more consistent across languages.
2015-04-23 11:12:42 -07:00
Jason Watkins
02f4c92fce Tweaked param name on setDREF in C client. 2015-04-23 11:12:41 -07:00
Chris Teubert
368c3bed20 fix- aopenUDP not returning socket 2015-04-23 10:08:05 -07:00
Chris Teubert
795e284ab2 A few mac fixes 2015-04-23 10:07:47 -07:00
Jason Watkins
55feee68ed Tweaked XPCSocket in C client.
- Re-added xpcSocket name in the struct namespace
 - Removed unused open field.
2015-04-22 14:35:46 -07:00
Jason Watkins
8e6819b80b Added doc comments to C client. 2015-04-18 09:16:15 -07:00
Jason Watkins
55f3953955 Fixed errors and removed unused code in the C client.
- Fixed a buffer overflow in sendCTRL.
 - Fixed incorrect inderection in readUDP.
 - Removed unused usleep function.
 - Removed redundant include of WS2tcpip.h
 - Fixed widespread error where sendUDP's return value was not being checked correctly.
 - Updated signature of openUDP to place optional parameters at the end
 - Fixed bug in CTRL command where the buffer length was not correctly set.
 - Fixed setCONN to correctlly reset the client's socket.
2015-04-17 10:56:03 -07:00
Jason Watkins
b7ace82649 Cleaned up drawing functions. 2015-04-17 10:56:02 -07:00
Jason Watkins
6ac20f0998 Cleaned up CTRL functions.
- Removed parseCTRL and readCTRL.
 - Tweaked variable type, order and naming.
 - Improved validation and error reporting.
 - Updated Interface Control Document to reflect adition of aircraft number to CTRL command.
2015-04-17 10:56:01 -07:00
Jason Watkins
0e6195c063 Cleaned up POSI functions.
- Removed readPOSI and parsePOSI functions. These were only used by the plugin, which no longer uses them.
 - Tweaked types, argument order, and names to improve concision and consistency with other functions.
 - Improved validation and error reporting.
2015-04-17 10:56:01 -07:00
Jason Watkins
80a1a2dcd2 Cleaned up DREF functions and tweaked printError.
- printError is now a varags function, and will print format strings for the message.
 - Removed several internal DREF functions from the header file.
 - Significantly improved error reporting in DREF functions.
 - Removed dynamic allocation for responses. Clients are now expected to provide fully allocated storage for getDREFs. An error message will be printed if the provided structure is too small.
 - Fixes nasa/XPlaneConnect#30
2015-04-17 10:56:00 -07:00
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