Jump to content
The simFlight Network Forums

Recommended Posts

Posted

I was about to post this over at the mycockpit PM forum, but the server appears to have crashed! It's probably more appropriate in here anyway, so here goes:

I have built my own 737 EFIS units using the excellent GPWiz40 boards from Groovy Game Gear. I would like to assign 4 buttons for setting the MINS and QNH on my EFIS as follows:

Button 1 - Dec (-.01/-1)

Button 2 - Dec (-.1/-10)

Button 3 - Inc (+.01/+1)

Button 4 - Inc (+.1/+10)

Why you may ask? Because the real units do not use encoders, they are a four position (five if you count the OFF position) return-to-centre switch.

Twist left = decrement 1

Twist further left = decrement 10 (and round down to next multiple of 10, i.e. if you had QNH 1027 set and twisted hard left, it would jump to 1020)

Twist right = increment 1

Twist further right = increment 10 (and round up to next 10)

That's so that if you want to set a BARO of 1100 (for example) to bug the single engine acceleration altitude for take-off, it won't take as long to wind up from say 200 or whatever the previous BARO landing minima was set to. Or if you take off from an airport with a QNH of 985 and land at an airport with a QNH of 1036 etc.

So reading the PM Offsets list, there is a definition for the Elan K Codes near the bottom which contains the following:

-Suggestion:

V10 MINS

V11 BARO

V12 Copilot MINS

V13 Copilot BARO

V101002 (increments MINS by 2 units)

V110004 (decrements BARO by 4 units) V11 [baro] 0 [dec] 004 [4 units]

Send offset and value to write in UIPC...

E0 [offset] [numbytes] [value] (value can be anything after the 7th byte, with or without leading zeroes

E00BC081234.5 writes 1234.5 in 0XBC0 8 bytes (=double)

E004F42005 writes 5 into 0x4F4 (i.e. E0 04F4 2 005)

E004F422 writes 5 into 0x4F4

Can someone explain how I would configure FSUIPC to achieve the button assignments I want, e.g. to decrement the captain MINS by 10 units I would expect to use V100010. But do I use the FSUIPC MCP K-Codes by Param and if so what string should I use? Everything else I have assigned for my EFIS works well, but I am too stupid to figure this out without help.

I would like to achieve the rounding if possible but that would be the icing on the cake! I looked at Peter Dowson's forum and thought it might be possible using the LUA plugins, but reading the documentation for LUA maths functions, I can't find ROUND. One for the clever people out there?

Posted

So reading the PM Offsets list, there is a definition for the Elan K Codes near the bottom which contains the following:

... Can someone explain how I would configure FSUIPC to achieve the button assignments I want

I really don't understand why you'd want to use that facility, which is really meant for programming in a program, not assigning as you wish. I think it was added years ago just for compatibility with some existing programs at the time which did use that rather unwieldy protocol..

For pilot's BARO setting, use the normal FS controls ("Kollsman inc/dec"). They are certainly fast enough -- you don't need fast and slow varieties. For the MDA/DH you will need to use the FSUIPC Offset controls, to inc/dec the PM offset for this. You could use the FSUIPC Offset control for the pilot's BARO setting as well, but since it is the standard FS facility there's really little point.

Incidentally, "ROUND" is not really a much needed function when numbers are automatically converted to integers when needed. For rounding you just add 0.5 before writing as an integer. Or, if you need to work with that integer in Lua, use

n = math.floor(m + 0.5)

The "floor" function gives the largest integer smaller or eual. adding 0.5 first therefore gives the rounding to "nearest".

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.