Jump to content
The simFlight Network Forums

Goksel Sunar

Members
  • Posts

    8
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Goksel Sunar's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Thank you , Pete. this csharp code is working . Maybe usefull for some one. private Offset<UInt16> APHeadingValue= new Offset<UInt16>(0x07CC); Get: txtApHeadingValue.Text = ((int)((APHeadingValue.Value+0.5)*360/65536)).ToString(); Set: "70 degree" APHeadingValue.Value = (70 * 65536 / 360);
  2. Hi plane AP heading value = 100 in the fsuipc log screen show = 07CC (u16) 18204 calculated AP heading value = 18204 *360 / 65536 = 99,99755859375 How can i get integer value (100) . Should i round this value ?
  3. Dear paul , now work :) function PFuelCutOffSwitch() testVar = ipc.readUD(0x66C0) n = ipc.readLvar('L:Eng1_FuelCutOffSwitch') if logic.And(testVar,1) == 1 then if n==0 then ipc.writeLvar('L:Eng1_FuelCutOffSwitch',1) end end if logic.And(testVar,1) == 0 then if n==1 then ipc.writeLvar('L:Eng1_FuelCutOffSwitch',0) end end end event.offset('66C0','UD', 'PFuelCutOffSwitch') Thank you a thousand times, how many times I have read pdf files, but I've missed. I have one final question with your permission. how can I define this offsets in .net . I did like the lights example but did not again :) lua code event.offsetmask(0x66C0, 8,'UD', 'Fuel_Pump') event.offsetmask(0x66C0, 256,'UD', 'Beacon_Light') event.offsetmask(0x66C0, 1024,'UD', 'Strobe_Light') c# code private Offset<BitArray> Lights = new Offset<BitArray>(0x66C0,2); // on FSUIPCConnection.Process(); lights.Value[1] =true ; // I was [0]...[8] I tried it a one to eight. //off FSUIPCConnection.Process(); lights.Value[1] =false ; // I was [0]...[8] I tried it a one to eight.
  4. Hi, I was able to write a working example code. But ,I am not sure is this the right way . I create a while loop in the Lua code . Because ,I could not find a way to continuous control of the offset value. II think when the offset value is changed , automatically trigger control for it self. am i wrong ? Because , as the first example , I do what you say , and open the log screen and I saw the offset value changing from csharp code but nothing happened in simulation. If can you review code and write a comment , I would be hapy :) Lua Code : function PFuelCutOffSwitch(param) n = ipc.readLvar('L:Eng1_FuelCutOffSwitch') if param == 1 and n==0 then ipc.writeLvar('L:Eng1_FuelCutOffSwitch',1) end if param == 0 and n==1 then ipc.writeLvar('L:Eng1_FuelCutOffSwitch',0) end end event.offset('0x66C0','UD', 'PFuelCutOffSwitch') while 1 do testVar = ipc.readUD(0x66C0) if logic.And(testVar,1) == 1 then PFuelCutOffSwitch(1) end if logic.And(testVar,1) == 0 then PFuelCutOffSwitch(0) end end csharp code private Offset<int> Pitot_HEAT = new Offset<int>(0x66C0); //ON FSUIPCConnection.Process(); Pitot_HEAT.Value=1; //OFF FSUIPCConnection.Process(); Pitot_HEAT.Value=0;
  5. I have a timer in the form and " FSUIPCConnection.Process();" in the procedure. I did as you said, but did not change the results. Maybe you have other suggestions? best regards. Goksel
  6. thank you for your interest . i did it some thing. First , I do NOT add a "LuaFiles" section. I create one lua file and assign to F6 key in the "FSUIPC Options and Settings" windows and , if I hit F6 key in the simulation , this is working good now.
  7. Hi I create one lua file and assign to F6 key in the "FSUIPC Options and Settings" windows and , if I hit F6 key in the simulation , this is working good now. Lua Code : function Pitot_HEAT() testVar = ipc.readUD(0x66C0) if logic.And(testVar,1) == 1 then ipc.control(65858,1) else ipc.control(65858,0) end end event.offset(0x66C0, 'UD', 'Pitot_HEAT') I am writing c# windows forms application and , I want to access this offset and change value . I wrote this code but did not get results. c# Code: private Offset<int> Pitot_HEAT = new Offset<int>(0x66C0) //ON Pitot_HEAT.Value=1; //OFF Pitot_HEAT.Value=0; thank you for your interest. Goksel
  8. Hi , I have a , Flight Simulator X and accelaration pack installed in c:\fsx folder and registred copy of fsuipc version 4.947c on windows 8.1 pro. I copy these files to the modules directory, record to csv.lua ipcDebug.lua display_vals.lua and edit fsuipc.ini file. [Auto] 1=display_vals 2=ipcDebug 3=record to csv [LuaFiles] 1=display_vals 2=ipcDebug 3=record to csv I run the fsx but nothing hapend. What I'm missing or what's missing. Please help me. best regards Goksel
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.