Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Can someone please help me with the Read command line in VB for roll?? I especially do not know how to format the roll address in VB. In C++ it looks like:

FSUIPC_Read(0x057C, 4, &uiRoll, &dwRollResult);

I would forever be greatful!

Curtis

Posted

my best guess would be

call fsuipc_read(&H057c,5,varptr(uiroll),dwreseult)

call fsuipc_process(dwresult)

you may have to do some math on the variable uiroll to get it in terms that you need

jd

Posted

Thank you JD so much!

You gave me the missing concept. If I get it right on the last line you meant to use in the process dwrollResult instead of dwResult correct?

Thank you again,

Curtis

Posted

i editted my post. the varialbe uiroll will contain the roll value in terms that are specified in the fsuipc sdk manual for programmers. dwresult simply is a variable used for success or failure

Posted

Thank you again JD.

I think the info in the SDK manual conflicts with my final program- I think the roll is in the pitch address and the number is 8 bits not 4...could that be possible???

Forever in your debt,

Curtis

Posted

here is my code

Public Function Plane_Bank() As Single

Dim x As Long

Dim dwResult As Long

Call FSUIPC_Read(&H57C, 4, VarPtr(x), dwResult)

Call FSUIPC_Process(dwResult)

Plane_Bank = x / 65536 / 65536 * 360

End Function

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.