Jump to content
The simFlight Network Forums

Simple Question


Recommended Posts

Hi Pete, Just one simple question... This may be stupid to ask. I am planning on writing a program on MCP with VB.NET. Just wonder, once offset is written in my program, and run it... Would that value of function (I guess that what this would be called?) show up into FS2004-->FSUIPC--->Module---> Button tab ---> "Conrol sent when button pressed" or "Control sent button released" list?

For example: PM wrote their codes and it shows up on "Conrol sent when button pressed" or "Control sent button released" list such as PM V/S, PM ALT and so on...

Now if I write my own variable:

Dim MyALT as long

Private Sub Timer1_Timer()

Call FSUIPC_WRITE(Offset,Value,VarPtr(MyALT),dwResult)

Call FSUIPC_Process(dwResult)

End Sub

Will the "MyALT" Appears in the "Conrol sent when button pressed" or "Control sent button released" list

Let me know

Link to comment
Share on other sites

Hi Pete, Just one simple question...

Simple? :roll: I just read through it three times and I'm still not really sure what the question is, I'm afraid.

This may be stupid to ask. I am planning on writing a program on MCP with VB.NET.

"On MCP"? do you mean you are going to program an MCP?

Just wonder, once offset is written in my program, and run it... Would that value of function (I guess that what this would be called?) show up into FS2004-->FSUIPC--->Module---> Button tab ---> "Conrol sent when button pressed" or "Control sent button released" list?

I don't understand any of that. Sorry. What offset, what program is run, what function (in the program?), and what has programming a function in VB.NET to write an offset got to do with FSUIPC's button programming facilities?

For example: PM wrote their codes and it shows up on "Conrol sent when button pressed" or "Control sent button released" list such as PM V/S, PM ALT and so on...

I'm really lost now. PM wrote what codes where, please?

The only thing that makes anything show as programmed in the FSUIPC Buttons page is you programming a button in the buttons page, or, if you like, editing the FSUIPC.INI file's [buttons] section as described in the Advanced Users documentation.

Programming a button or keypress is nothing whatsoever to do with writing a program in VB or C or C++ or Delphi. Perhaps the term "programming" is what is confusing you? The buttons and keys facilities in FSUIPC are just assignments, like assigning FS controls to keys or buttons in FS's own Options-Controls-Assignments, only more so.

Now if I write my own variable:

Dim MyALT as long

Private Sub Timer1_Timer()

Call FSUIPC_WRITE(Offset,Value,VarPtr(MyALT),dwResult)

Call FSUIPC_Process(dwResult)

End Sub

Will the "MyALT" Appears in the "Conrol sent when button pressed" or "Control sent button released" list

Ah, this is a different question. And the answer is simple: no. How can it? Those lists are (a) all FS controls as listed by Microsoft in their CONTROLS.DLL, plus (b) all the extra controls added by FSUIPC, as listed in the Advanced User's document, and described in the User Guide. In other words, they are all pre-defined in one place or another, and all documented and listed.

You can certainly use the added FSUIPC controls for reading and writing Offsets to access any FSUIPC offset. The offset controls are some of the special controls added by FSUIPC, and they are listed.

Regards

Pete

Link to comment
Share on other sites

Pete I am sorry if I wasn't clear enough for you... Maybe I am confused or maybe not. But please bear with me, I am trying my best to explain.

I am currently building B767 home cockpit simulator, and uses EPICUSB via FSUIPC. And at this moment, I am all focus on MCP buttons/toggle switches. Now If I was going to program toggle switch from MCP, I can simply go into FSUIPC when FS running, then select Button tab, click on switch and it will automatically show what toggle is being activated in the box... then I can select open list and select what function would toggle work ie. 'AP on/off'. Unfortunately, in most situation, there isnt complete function for a B767 MCP for instance I could not find LNAV or FLCH inthe list, and apparently its all from FS (If I am not mistaken) So I thought I could program it and it will simply show up on list.

I am using PM as example, because if the checkmark is checked it will show lists of PM's function if keypresses is being assigned.

I hope I get you clearly??

Link to comment
Share on other sites

Unfortunately, in most situation, there isnt complete function for a B767 MCP for instance I could not find LNAV or FLCH inthe list, and apparently its all from FS (If I am not mistaken) So I thought I could program it and it will simply show up on list.

There are no default aircraft for FS with FLCH or LNAV modes built in. If you are using a specific add-on aircraft with FS you will need to find out how to interface to its MCP. For instance, the PMDG 737NG series allow you to assign keyboard shortcuts to most things, and it is these keypresses which you would program in the FSUIPC buttons page.

I am using PM as example, because if the checkmark is checked it will show lists of PM's function if keypresses is being assigned.

Project Magenta is supported as a special case because (a) if it the only fully adaptable cockpit system which uses FSUIPC offsets throughout for all controls and (b) which openly publishes these offsets and how to use them. Please check the PM offsets list on http://www.projectmagenta.com/resources/docs.html and you will see what I mean.

There is nothing else I know of comparable to this in its flexibility of application nor openness of its interface. Hence the assistance in manipulating its offsets by added FSUIPC controls.

You can do similar things with any offsets, but there won't be special FSUIPC controls for them -- you would use the generic Offset controls provided by FSUIPC for such purposes.

However, it is no use you setting and changing FSUIPC offsets which don't actually connect to anything which does something useful. What are you trying to communicate to by doing this? Are you implementing MCP gauges in FS and trying to connect to them from your hardware through FSUIPC? If so, why not just make your gauges deal with the buttons and switches directly?

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.