Jump to content
The simFlight Network Forums

StevenT72

new Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by StevenT72

  1. That explains my Amp value not working correctly in the negatives! That make so much more sens now that I see it done. I'll make the changes and see how things work out. Big Thank you again StevenT
  2. Thank you so much for the reply. I am new to the offset thing and didn't realize how the bits and bytes worked. I set the offsets at 2 byte spacing and everything is working as expected. Tried to use the ipc.writeStruct but I think I'm not understanding how it works. If I write it as... "ipc.writeStruct(0x66c0,Amps,EGT,FuelFlow,OilTemp,OilPressure,EngRpm,FuelPressure,BattVolts,CylHeadTemp)" will it use the 2 byte spacing or fit in as needed? Do I need to add "9UW" after the offset or will it just know? Thanks again, StevenT
  3. Hello, I've been making a LUA script to get outputs of systems in A2A Comanche 250. With the code, the display in the lua window shows the correct and steady numbers. When I look at the data, for use with link2fs, the data is "jittering". Changing from correct to incorrect. This only happens, however, when I have more than 4 ipc.write's active (turning off with comments), four or less and it fine. I've tried changing the delay and it doesn't help. Is there something I'm' doing wrong? Any help is greatly appreciated. Here is the code... -- rounds the integer function round(num) num = tonumber(num) if num == nil then return 0 end if num >= 0 then return math.floor(num+.5) else return math.ceil(num-.5) end end while 1 do Amps = round(ipc.readLvar("L:Ammeter1")) EGT = round(ipc.readLvar("L:Eng1_EGTGauge")) FuelFlow = round(ipc.readLvar("L:Eng1_GPH")) OilTemp = round(ipc.readLvar("L:Eng1_OilTemp")) OilPressure = round(ipc.readLvar("L:Eng1_OilPressure")) EngRpm = round(ipc.readLvar("L:Eng1_RPMGauge")) FuelPressure = round(ipc.readLvar("L:Eng1_FuelPressure")) BattVolts = round(ipc.readLvar("L:Voltmeter")) CylHeadTemp = round(ipc.readLvar("L:Eng1_CHTGauge")) ipc.writeUW(0x66c0,Amps) --ipc.writeUW(0x66c1,EGT) ipc.writeUW(0x66c2,FuelFlow) --ipc.writeUW(0x66c3,OilTemp) ipc.writeUW(0x66c4,OilPressure) --ipc.writeUW(0x66c5,EngRpm) ipc.writeUW(0x66c6,FuelPressure) --ipc.writeUW(0x66c7,BattVolts) ipc.writeUW(0x66c8,CylHeadTemp) ipc.display("Amps: "..Amps.."\nEGT: "..EGT.."\nFuel Flow: "..FuelFlow.."\nOil Temp: "..OilTemp.."\nOil Pressure: "..OilPressure.."\ Eng RPM: "..EngRpm.."\nFuel Pressure: "..FuelPressure.."\nBatt Volts: "..BattVolts.."\nCyl Head Temp: "..CylHeadTemp,1,"") ipc.sleep(1000) end Thanks StevenT
×
×
  • 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.