Jump to content
The simFlight Network Forums

Henrique Sirot

new Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Henrique Sirot

  1. I'm using FSX. I have read the detais of the offset, but didn't find it very explainative. Like, how can I even read from a payload sector? Because normally, I would do this: result = fsuipc.FSUIPC_Read(0x1400, 48, ref token, ref dwResult); result = fsuipc.FSUIPC_Process(ref dwResult); result = fsuipc.FSUIPC_Get(ref token, ref dwResult); crewWeight = dwResult;[/CODE] And when I try to run that with the 1400 offset, it simply will always read 0 or True, even though the actual weight should always be 385 KG for this sector. I've seen somthing about BitConverter, but no idea how that would work, and I couldn't find any portion of usable code about that.
  2. Hey, guys! I'm a beginner in applications with FSUIPC, and I'm pretty sure this is a stupid question but, how do I set the payload of an aircraft? The plane in question is an Embraer 195, with 3 sectores: crew, passengers and cargo. I can read and set the fuel levels, but got nowhere close with the payload. Here's what I'm doing so far, fuelwise: double targetFuel = 2134; double maxFuel = 6495.225; int formula = (int)((targetFuel * 100 / maxFuel) * (128 * 65536) / 100); result = fsuipc.FSUIPC_Write(0x0B94, formula, ref token, ref dwResult); result = fsuipc.FSUIPC_Write(0x0B7C, formula, ref token, ref dwResult); result = fsuipc.FSUIPC_Process(ref dwResult); This works as a charm, but I have no idea how to work on offset 1400. Any help at all would be greatly appreciated. Thank you!
×
×
  • 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.