Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hello all,

I'm new and i have a Problem with the

FSUIPIC SDK and Delphi.

A professional of you has for me a few examples for programming the SDK in Delphi?

- A/P On/Off

- write Nav-Frequenz

I am to stupid for the bits programming :-(

Many, thank you!!!!

Posted

The Delphi examples in the SDK doc are quite helpful in fact.

Did a bit of testing last year but I seem to have deleted that code (was more a getting to know the API than anything useful anyway).

You will need to dive into bits and bytes, and especially pointers. They're indispensible.

Posted

you get the address for the pointer into the FSUIPC data set correctly?

The offset is nothing more or less than the number of bytes after that address that you start reading.

It often helps to set up a struct with all the fields you want programmed as datatypes of the correct length and the rest as arrays of bytes of appropriate length.

You can then simply read the member of that struct after filling it using the appropriate function in the SDK (the struct is effectively a mapping over the FSUIPC memory).

Posted

Hello,

yes, the address for the pointer into the FSUIPC data set is correctly.

I have a Problem with the send to the array of bytes.

My Magenta MCP does not switch the correct buttons.

Here is my code:

...

var

myHandle : DWORD;

fSetBits : array[1..????] of Byte;

begin

// Adress $5414 = for the MCP Buttons

fSetBits := ??????? What here to set the AP1 or AP2 Button???

FSUIPC_Write($5414, 3, @fSetBits, myHandle);

FSUIPC_Process(myHandle);

end;

Posted
My Magenta MCP does not switch the correct buttons.

Are you using the documentation from the Magenta site? Doesn't it say that the bits in the MCP control (5414) operate by TOGGLING? This means the MCP has to see them change. You have to read the word, change the bits you want, then write it back.

I think for good help with interfacing to PM you will be better off in the Project Magenta newsgroup, as the data is dealt with by PM code, not by any of mine. FSUIPC is just the postman.

Regards,

Pete

Posted
sorry for my question... :-(

Hey, don't be sorry! Your question was okay, and I tried to help. But there will be more knowledgeable folks on Project Magenta matters in the Project Magenta area I think. I just want you to get the best answers.

Meanwhile, I did just check the PM FSUIPC details and it does say the bits in 5414 are to be toggled, so this is probably your main problem. Okay?

Regards,

Pete

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.