Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12
  1. #11
    10+ Posting Member
    Join Date
    Mar 2014
    Location
    Netherlands
    Posts
    10
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: P3Dv4 FSUIPC5 LUA and Arduino

    Hi Fess, Thank you, i'am learning every day about Lua and programming. So if i use the PMDG 737 Event ID's, the Lua code for the course selector looks like:

    if (string.find(datastring, "A56")) Then
    ipc.control (70008, 536870912) -- Left course Up
    End

    if (string.find(datastring, "A55")) Then
    ipc.control (70008, 214748364 -- Left course down
    End

    Am I right?

  2. #12
    150+ Forum Groupie
    Join Date
    Nov 2013
    Location
    Evansville, Indiana
    Posts
    251
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: P3Dv4 FSUIPC5 LUA and Arduino

    Mine looks a little different.
    Code:
    --- L CRS -------------------------------------
    	if (string.find(datastring, "A56")) then  --L CRS UP
    		ipc.control(69632+376,0x80000000) 
    		
    	end
    	if (string.find(datastring, "A55")) then  --L CRS DOWN
    		ipc.control(69632+376,0x20000000)
    		
    	end
    I use the hex value from the PMDG .h file
    I will only ever be, half the Geek that I wished I was.
    TheGeekForge.Com

Page 2 of 2 FirstFirst 12