Henry Street Posted November 12, 2013 Report Posted November 12, 2013 Hi Pete, I am a complete novice at programming so please bear with me. I am trying to program the MFD's in the default Hornet using LUA. This picture shows the FSUIPC button definition that is working. Is this Lua command (not working) the equivalent to that FSUIPC programming? function Rt_MFD_Button_5 () ipc.writeDD(x3110, x00011205) end Thanks for all your help
Pete Dowson Posted November 12, 2013 Report Posted November 12, 2013 function Rt_MFD_Button_5 () ipc.writeDD(x3110, x00011205) end Thanks for all your help Programming languages all have different ways of representing numbers in different radices. The Lua (and C/C++) way of representing a hexadecimal number is by preceding it with "0x" not just "x". To most languages, anything that begins with a letter is a name, not a number. The 0 tells them it is a number, and the x says it is in hex. FSUIPC doesn't need this convention because you can't use names, so it simplifies just to x. So your line should be ipc.writeDD(0x3110, 0x00011205) I see you are embodying it in a function. I assume you have something calling that function? Regards Pete
Henry Street Posted November 12, 2013 Author Report Posted November 12, 2013 Thanks for the correction, it is working now! I am using LINDA with Thrustmaster MFD and creating a library for Dino C's Goshawk.
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