Jump to content
The simFlight Network Forums

Jostick Buttons


rab63
 Share

Recommended Posts

Hi Peter

Firstly let me start by saying fsuipc is a great module stumbled into abt 2 years ago and only just got around to using it again.

i will cut to the chase, i am building my own little cockpit control setup as part of this i am employing some lcd modules and have got them running, now at the moment i am scripting the .ini file for fsuipc with button combinations i have 3 x buttons all with flag options so that i can use 2 x rotary to controll coms, nav etc.. my question is and i only ask this after reading fsuipc4 for advanced user,fsuipc for programmers and ofcourse the users guide, when you setup a button using the toggle a button flag within the .ini or button and switches tab in fsuipc what memory location is that then stored in .

The reason i ask this is because i am using SIOC's to setup lcd modules and on one of the screens i want to show button status as it may get more complex as combinations are added, as you may or may not know SIOC is event based so i need the memory location to trigger event SIOC can read direct from fsuipc, the reason i cannot programme this from SIOC's end is because i am not using there IO cards for buttons.

Regards

Rabrab63

Posts: 1

Joined: Fri Sep 03, 2010 12:57 pm

Private messageE-mail rab63

Link to comment
Share on other sites

when you setup a button using the toggle a button flag within the .ini or button and switches tab in fsuipc what memory location is that then stored in .

The real buttons aren't stored anywhere, only polled from the devices -- unless you mean the memory used to see when they changed. Those and the associated button flags are in FSUIPC private memory, not currently accessible outside FSUIPC. The 288 virtual buttons are, of course, in their dedicated offsets from 3340 onwards.

The reason i ask this is because i am using SIOC's to setup lcd modules and on one of the screens i want to show button status as it may get more complex as combinations are added, as you may or may not know SIOC is event based so i need the memory location to trigger event SIOC can read direct from fsuipc, the reason i cannot programme this from SIOC's end is because i am not using there IO cards for buttons.

Are these buttons seen in FSUIPC as regular joystick buttons? If so there's no current way to see these in FSUIPC offsets, unless they are programmed to set some user offsets via the "Offset" controls.

It would be possible for me to map local joystick button memory locations to FSUIPC offsets. That would be the 16 x 32 bit words for joysticks 0-15. Would that do the trick?

Regards

Pete

Link to comment
Share on other sites

Hi again peter,

Just to say thanks for rapid response, i must apologise for what must seem like a slugish response in comparison, sent the message as last resort just before going to work for the day.

mapping them would do the trick as i am not looking to do anything major just read results of fsuipc actions regarding button press.

thanks again for your help at least i can plan then next move knowing i have not overlooked anything.

Regards

Rab

Link to comment
Share on other sites

mapping them would do the trick as i am not looking to do anything major just read results of fsuipc actions regarding button press.

Well it would merely be the map of the current button states (pressed or released), not of any actions which ensued.

I'll post again here when I have an update for you to try. Maybe tomorrow (Monday).

Pete

Link to comment
Share on other sites

I'll post again here when I have an update for you to try. Maybe tomorrow (Monday).

Okay. FSUIPC versions 3.989c and 4.626, now available in the Updates Announcement, provide the button states as follows:

The current state of the buttons on actively scanned joysticks (local ones, 0 to 15) is readable in FSUIPC offsets 03C0-03FF. Each of the 16 DWORDS contain the 32-bit state of the joystick 0-15, in order. Button 0 is the least significant bit (bit 0)in each DWORD.

Regards

Pete

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • 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.