druyda Posted April 29, 2014 Report Posted April 29, 2014 I'm building an auto-pilot module for FSX (flight simulator) with push buttons and rotary encoders. My micro is one ATmega88. My question is how I do the communication with FSUIPC (software to read and write assignments to simulator) and my hardware? I'm going to use a serial communication to PC and I have also make a program to read and write values... but how do I get these values for FSUIPC? Many thanks.
Pete Dowson Posted April 29, 2014 Report Posted April 29, 2014 I'm building an auto-pilot module for FSX (flight simulator) with push buttons and rotary encoders. My micro is one ATmega88. My question is how I do the communication with FSUIPC (software to read and write assignments to simulator) and my hardware? I'm going to use a serial communication to PC and I have also make a program to read and write values... but how do I get these values for FSUIPC? There are two ways. If you are writing an actual driver program, running as a process on the FS or other computer on a Network, then you need to download the FSUIPC SDK, which includes everything you need -- except maybe, for managed .Net languages you might also look at Paul Henty's superb DLL (see the separate SubForum about this). The SDK is available in the Download Links subforum or on the www.schiratti.com/dowson page. Another way is to write it as a plug-in, using Lua and the Lua libraries built into both FSUIPC and, for network use, WideClient. The Lua library set provided actually includes full serial port support (the com library), so the whole thing can be done that way. Lua document and examples are installed in your FSUIPC documents sub-folder, in the FS Modules folder. Your choice. As far as the variables accessible to you in FSUIPC, please refer to the Programmers Guide (for FS9) and/or the Offsets Status documentation, installed for you in your FSUIPC Documents folder. Regards Pete
druyda Posted May 19, 2014 Author Report Posted May 19, 2014 Hello Pete, thanks for your response. I decided programming in C to start learn my own connection with sim. But i have the first problem: I can't compile the UIPCHello example. In 'UIPC_SDK_C' folder i have intructions to put the header file and the LIB in my source folder. So, i have IPCuser.c and IPCuser.h in folder of complier includes. But when i compile, it gives me a several 'Linker Error': [Linker error] undefined reference to `FSUIPC_Open' (...) [Linker error] undefined reference to `FSUIPC_Version' Anothers questions: In your example of connection (UIPCHello), in function FSUIPC_open i dont have any reference to FSX, only until FS2004. I have to create a connection for FSX? I have an unregistered version of FSUIPC, is this a problem? Cheers. druyda
Pete Dowson Posted May 20, 2014 Report Posted May 20, 2014 Hello Pete, thanks for your response. I decided programming in C to start learn my own connection with sim. But i have the first problem: I can't compile the UIPCHello example. In 'UIPC_SDK_C' folder i have intructions to put the header file and the LIB in my source folder. So, i have IPCuser.c and IPCuser.h in folder of complier includes. But when i compile, it gives me a several 'Linker Error': There's an art in trying to get projects set correctly in Microsoft C. You need to make declarations for the libraries you are using. there's all sorts of arcane magic to getting things correct. If you are a beginning programmer, then C is really not a good choice. You might want to consider Visual Basic and Paul Henty's easy-to-use .Net DLL -- see the subforum about this. In your example of connection (UIPCHello), in function FSUIPC_open i dont have any reference to FSX, only until FS2004. I have to create a connection for FSX? Just use the ANY option. The Header file defines the options, though it might be out of date for FSX and P3D. The current Programming and Offsets guides are the best references. I'm afraid than in the last few years much more attention has been afforded to the Lua plug-in facilities, and these are generally so much easier for new programmers and experimenters. Even though i do write fluently in C I still use Lua for many things, or for prototyping something i later code in C. I have an unregistered version of FSUIPC, is this a problem? No. Access through the interface is free (except for commercial purposes). Pete 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now