Jump to content
The simFlight Network Forums

Fixed Digit Offsets?


Recommended Posts

Hi Pete,

Could you please let me know if there are any fixed digit offsets that I might be able to use to display. I require the fixed digits 1 & 0 so I can output on some seven segments displays for the use of a leading 1 for radios and trailing zero's for MCP Altitude, etc.

Kind Regards,

Brad Heller.

Link to comment
Share on other sites

Could you please let me know if there are any fixed digit offsets that I might be able to use to display. I require the fixed digits 1 & 0 so I can output on some seven segments displays for the use of a leading 1 for radios and trailing zero's for MCP Altitude, etc.

Sorry, I am lost here. What would "fixed digits" be in FSUIPC offset terms, and why would you need any offsets at all to display anything, let alone something fixed?

Regards,

Pete

Link to comment
Share on other sites

I require the fixed digits 1 & 0 so I can output on some seven segments displays for the use of a leading 1 for radios and trailing zero's for MCP Altitude, etc.

Okay, now that you explained this on the 'phone, here's what you can do.

There are 64 bytes of free offset space reserved for users. Currently I use them in the programming examples in GFdisplay only. They are from 66C0 to 66FF inclusive.

You need to program a button (one which isn't real, so you don't lose a real one) to set a WORD (16-bit or 2-byte) offset to the value 1. You'll need to edit the INI file for this as you don't have the button to program on-line.

I'll choose button 0 on joystick 16, just as an example, and offset 66C0. In the [buttons] section add:

InitialButton=16,0

1=P16,0,Cx020066C0,x0001

If you already have buttons programmed, just make the 1= line the next sequential number available instead of 1.

What this does is make FSUIPC simulate the pressing and releasing of button 16,0 when it starts. The Control "x020066C0" says "Offset Word Set" and the parameter x0001 sets that offset to 0001.

This gives you a 1 in byte offset 66C0, and a 0 in byte offset 66C1.

I hope this is clear.

Incidentally, if there are other things you need doing initially, just add more program lines for button 16,0. They will be done in the order of the line numbers (the 1= bit).

Regards,

Pete

Link to comment
Share on other sites

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.