Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Best regard

In the Button and Switch Assignments area, I have programmed some switches for:

Adf 1 Dec

Adf 1 Inc

Adf1 Radio Swap.

 

This has generated some texts within FSUIPC7.ini which appear like this:

[Buttons]
PollInterval=25
ButtonRepeat=20,10
2=PB,0,C65668,0     -{ADF_1_DEC}-
3=PB,1,C65650,0     -{ADF_1_INC}-
4=PB,18,C66741,0     -{ADF1_RADIO_SWAP}-

Up to this point, everything works well and the buttons do their job and on the plane's ADF panel, they change without problem.

What I want is to take this information to a variable that could start in 66C0 so that I can read it with the Opencockpits SIOC program to present it on an LCD display

I have created a file called myOffests.txt inside the FSUIPC7 folder and written the following information inside that file:

// offset, size, simvar, type, units [, w]
0x66C0, 1, ADF_1_DEC, Bool, Bool, w
0x66C1, 1, ADF_1_INC, Bool, Bool, w
0x66C2, 1, ADF1_RADIO_SWAP, Bool, Bool, w

But it does not work. I don't know if I need to put some extra information in the FSUIPC7.ini, such as:

[myOffsets]
1=myOffsets

I have programmed many events in SIOC and they work fine, but I cannot get this information that I need. If you can please help me with this project, I would be very grateful.

Posted
11 hours ago, P-38L said:

What I want is to take this information to a variable

What information? If you want the ADF information, this is already held in offsets - search the Offset status document for ADF. 

11 hours ago, P-38L said:

I have created a file called myOffests.txt inside the FSUIPC7 folder and written the following information inside that file:

// offset, size, simvar, type, units [, w]
0x66C0, 1, ADF_1_DEC, Bool, Bool, w
0x66C1, 1, ADF_1_INC, Bool, Bool, w
0x66C2, 1, ADF1_RADIO_SWAP, Bool, Bool, w

But it does not work. I don't know if I need to put some extra information in the FSUIPC7.ini, such as:

That will never work... The myOffsets.txt file is for adding simvars (or A-type variables) to offsets. Those are FS events/controls and do not have an associated value.

John

Posted

Thanks for your kind reply. I'm still lost.

How can I create a variable in FSUIPC7 so that it can be read through the Opencockpits SIOC through LeoBodnar switches.

For example, the variable 66C0 that detects if a switch was used through LeoBodnar in which it writes a 1 or a 0 and this is read taking the address 66C0 to be used in the Opencockpits SIOC.

Maybe you can show me an example. Thank you so much.

Posted
1 hour ago, P-38L said:

How can I create a variable in FSUIPC7 so that it can be read through the Opencockpits SIOC through LeoBodnar switches.

Why do you need to create a variable? You can just write whatever you want to a (free for general use) offset. You can write to offsets using either the provided offset controls or lua. If you want to create a variable, then create an lvar, but I do not understand why you would want to do this. 

1 hour ago, P-38L said:

For example, the variable 66C0 that detects if a switch was used through LeoBodnar in which it writes a 1 or a 0 and this is read taking the address 66C0 to be used in the Opencockpits SIOC.

0x66C0 is an offset, not a variable. Please do not confuse the two. If you want to write 1 to the offset (or maybe toggle between 0 and 1) when a switch/button is pressed, then assign the switch/button/whatever to an offset control, such as Offset Byte Set or Offset Byte Togglebits. You can overload your assignments if needed, so the button/switch can also send other controls/perform some other function as well as changing an offset value.

Please note that I am on holiday now, and will not responding further until January. Please use the provided documentation and these forums - all the information you need is there somewhere, although it can be difficult to find...

John

 

 

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.