Airspace Posted August 19, 2008 Report Posted August 19, 2008 Hello Pete, Just like the virtual joysicks, offset $3340, containing 64 buttons, I can write and read them. (I use SIOC) But, How can I readout my ACTUAL connected joysticks to determine if a button is used. Is it similar to the virtual ones? And is there an offset? And the offset of 2nd and 3rd? I'm very new into this, but learning fast. I have 3 actual joysticks connected: -2 genuine -1 PPJoy I want to determine a button press on a genuine and PPjoy. Hope you can help me out,, Thanks already! Airspace
Pete Dowson Posted August 19, 2008 Report Posted August 19, 2008 Just like the virtual joysicks, offset $3340, containing 64 buttons, I can write and read them. (I use SIOC) Well, they're meant to be written, not read, by applications, and then programmed in FSUIPC's Buttons programming section to perform whatever actions you need them to do. I'm not sure why you'd ever want to read them, unless you are using them as a means of communication between two applications on different PCs -- but for that it would be far better to use a common dedicated set of offsets (obtained on application). How can I readout my ACTUAL connected joysticks to determine if a button is used. FSUIPC uses the Windows "joy" API for that - joyGetPosEx in fact. It is an easy interface to use if you know the Joystick number in Windows. Is it similar to the virtual ones? No, of course not. FSUIPC cannot read virtual buttons from Windows as they don't really exist. Virtual buttons are just bits in memory. Real buttons are physical things which connect into a PC and are read by USB or other joystick drivers. To read those you have to use the relevant API into Windows. I have 3 actual joysticks connected: -2 genuine -1 PPJoy What's a "PPJoy"? I want to determine a button press on a genuine and PPjoy. Why are you reading buttons? What is the purpose of doing so? Maybe if I understood what you wanted to do I could help more. Regards Pete
Airspace Posted August 19, 2008 Author Report Posted August 19, 2008 Hello Pete First of all: Thank you for the time you take answering me. I will explain what I want: I'm building a home cockpit, using PMDG 737. As we know, offsets are limited for PMDG. My objection is to light certain B737 indicators according to Flightsim. I use a small but great emulator program named GLOVEPIE. You can emulate key presses, mouse clicks, midi speech, trackIR, WII and many more. It also uses PPJOY, which is Windows Parallel Port Joystick driver, which is actually a VIRTUAL joystick for windows. I assumed you knew it, sorry.. But PPJOY is recognised as a normal joystick by windows AND Flightsim! It's my JOY 2 on Flightsim and de FSUIPC Virtual Joysticks starts at number 64. I already emulated PPjoy button presses whitin Flightsimulator(9). GlovePie can trigger an event upon the change of a specified SCREENPIXEL! So when my indicator lightens and the pixel color changes, it sends a ppjoy button. I could also use a keypress, but want to save keys for other purposes, since I have many Indicators. I use IO Hardware SIOC, from OpenCockpits, which can read and write offsets. If it can readout the PPjoybutton I would be able to light a LED according to the indicator. So, - GlovePIE able to see pixelcolor and trigger event: joystick button or keypress - Hardware/Software able to light led according to SIOC and Offsets How to interconnect those two? Or is it possible to set and read certain "flags" at a certain offset with the event of a joystick button? Thanks Again, Airspace
Pete Dowson Posted August 19, 2008 Report Posted August 19, 2008 I use a small but great emulator program named GLOVEPIE. You can emulate key presses, mouse clicks, midi speech, trackIR, WII and many more. It also uses PPJOY, which is Windows Parallel Port Joystick driver, which is actually a VIRTUAL joystick for windows. I assumed you knew it, sorry.. But PPJOY is recognised as a normal joystick by windows AND Flightsim! Okayso it should also be recognised as a normal joystick in FSUIPCunless their driver is only written for DirectInput and not also for the standard Windows joystick interface. It's my JOY 2 on Flightsim and de FSUIPC Virtual Joysticks starts at number 64. That's not really relevant. FSUIPC's virtual joysticks are just bits in memory. They are nothing to do with anything real, or anything in Windows. I use IO Hardware SIOC, from OpenCockpits, which can read and write offsets. If it can readout the PPjoybutton I would be able to light a LED according to the indicator. If you want the button to do something, why not just program it in FSUIPC? If FSUIPC can detect the button, you can program it. There are FSUIPC controls for changing offset values (Offset DWORD Setbits, clrbits and Togglebits, for example). There are offsets free for users at 66C0 to 66FF. Just program your buttons to change bits in one of the user offsets, then you can see them in SIOC. I think perhaps you've been led astray in your thinking by the term "virtual joystick" being applied by two different applications in two completely different ways. Forget about FSUIPC's virtual joysticks. They aren't relevant here. Regards Pete
Airspace Posted August 20, 2008 Author Report Posted August 20, 2008 Ok, I think I know the right direction now. Using the Offsets for users and the programming in FSUIPC should be it! Just have to understand FSUIPC a little more, but there's enough to read on the internet, so I will figure it all out.. already found a post about that. Thanks again for the quick answering.. Regards, Airspace
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now