Jump to content
The simFlight Network Forums
Sign in to follow this  
Chisco

Stubborn Hat switch will not stop panning views - Hotas warthog

Recommended Posts

Two weeks ago I downloaded and installed I registered a FSUIPC version. The latest one (4.80).

Have FSX with a HOTAS Warthog and a Milviz F-15. I am trying to assign key commands to the throttle hat switch in profile mode to go with my F15. Go to FSX Controls, look for the command assigned to the hat switch, its the pan view (not sure the name), delete the joystick assignment and return to FSX. Go into FSUIPC, keys assignment, select each of the hat switch cardinal points positions, select profile mode to restrict the key presses to this particular profile, and assign key presses to each of the 4 (up, down, left and right) positions. Exit FSUIPC and back to FSX.

Go back to FSX and try to use my now expertly set new keys assignments. No joy, pan view its there. Go back to FSX controls and the joystick assignment for the hat view and check its really deleted. Does not show up there. Go back to FSUIPC and check the key presses are properly set. They are.

Other keys programmed and assigned to buttons in my HOTAS Warthog work flawlessly, in general and profiles modes.

Am I missing something about this button?. Hat switches seem to be special for windows.,. I am sure someone else has found similar issues?

(Selecting "ignore controls" within FSX does nort seem to do the work either, but just tried this once...).

Is there any way to tell FSX to consider my hat switch as normal buttons?

Thanks for any help.

Share this post


Link to post
Share on other sites

Go to FSX Controls, look for the command assigned to the hat switch, its the pan view (not sure the name), delete the joystick assignment and return to FSX. Go into FSUIPC, keys assignment, select each of the hat switch cardinal points positions, select profile mode to restrict the key presses to this particular profile, and assign key presses to each of the 4 (up, down, left and right) positions. Exit FSUIPC and back to FSX.

Please clarify. You want specific fixed views, not panning? Is that right? I don't think you can in virtual cockpit mode, You probably need to be in 2D cockpit mode for the FS fixed view controls to work.

If you want to use panning, just assign the Hat to Pan View in the Axis assignments tab.

Is there any way to tell FSX to consider my hat switch as normal buttons?

FSUIPC will view it as separate buttons, but you need to assign to FS controls which actually do what you want them to do. It's getting the controls right which is the important part. The Hat can be interpreted in either or both ways -- a set of buttons and/or an axis with specific direction values.

Pete

Share this post


Link to post
Share on other sites

Thanks Pete.

Nope, what I want is to assign certain key presses to control the radar cursor on that particular aircraft. Basically some simple combinations of letters with the shift key (such as SHF+e). Forgive me for stating the obvious (to help define the problem): the key combinations I plan to use are already defined in FSX and work well to achieve my particular purpose in that particular aircraft. If i use them via the keyboard, the radar cursor moves as intended. Also, I am able to assign those specific combinations of key presses to joystick buttons via FSUIPC, and I am able to make them work. So FSUIPC can interface between my controller and FSX.

The problem appears with any of the two hat switches (one in the throttle, the other in the joystick). They seem to "retain" the default panning view behaviour which is installed by defect when the controllers are connected. I get both, panning AND the key presses defined within FSUIPC.

So I cannot remove the panning view behaviour even after removing it via the FSX menu for Controls. I would end up having both: a key command press via FSUIPC and the "default" panning view. Very weird!

Share this post


Link to post
Share on other sites

Is there a chance I could have ended up doing BOTH? i.e. assigning the hat to the pan view from within FSUIPC axis assignment tab AND assigning buttons via the buttons tab? If so, how can I check that?

Share this post


Link to post
Share on other sites

The problem appears with any of the two hat switches (one in the throttle, the other in the joystick). They seem to "retain" the default panning view behaviour which is installed by defect when the controllers are connected. I get both, panning AND the key presses defined within FSUIPC.

...

Is there a chance I could have ended up doing BOTH? i.e. assigning the hat to the pan view from within FSUIPC axis assignment tab AND assigning buttons via the buttons tab? If so, how can I check that?

You can check the axis assignment in the Axis assignments tab in FSUIPC options. Just go there and operate the hat, see if it's assigned.

To eliminate other possible duplicates, first check exactly what is happening. Enable both Event options on the left side of the Logging tab, operate the hat, then view the log. If you put FSX into Windowed mode and enable the Console in the Logging tab you will be able to see what happens in the Log in real time.

Regards

Pete

Share this post


Link to post
Share on other sites

I am happy to report I found the culprit: EZDOK.

EZDOK has a menu option to configure joysticks (really to tell the program you have a joystick). Its very simple menu and has just two options. Its probably there for the user to be able to assign EZDOK camera views to joystick buttons. One of the menu options is a check box with the (now) very telling label "HAT switch as button". Checked the box and voila, hat switch is now obediently following FSUIPC commands and nothing else.

Thank you for your suggestion re the console mode, which helped me determine that FSUIPC was not the cause of my problem. This is now solved.

Share this post


Link to post
Share on other sites

I am happy to report I found the culprit: EZDOK.

...

Thank you for your suggestion re the console mode, which helped me determine that FSUIPC was not the cause of my problem. This is now solved.

Good.

I use EZDOK also, but in my cockpit I have no hat switch, just a pair of rocker switches on the yoke which are programmed to select four EZDOK smooth views.

Regards

Pete

Share this post


Link to post
Share on other sites

Chisco, would you mind sending me your FSX FSUIPC PROFILE?

I have been a paid up FSIUPC user for years, and after seeing Pete's reply, I was struck with shame that I've never fully utiliized the interface. Perhaps your file will give me a head Re-start. And Pete, while I've never spent the time with your wonderful product I should have, I DO know the HUGH impact you and FSUIPC have had on the sim community.

Thank you!

chas

Share this post


Link to post
Share on other sites

i have fsuipc 4.85, FSX and a saitek 52 joystick. The hat switch is assigned to View panning in the FSX control setting. I was wondering if it is possible to make the panning function conditional (upon another button being pressed) using fsuipc. I don't know if this helps, but when I look under axis assignment in the fsuipc options and settings, this hat switch is assigned to the P axis.

Share this post


Link to post
Share on other sites

i have fsuipc 4.85, FSX and a saitek 52 joystick. The hat switch is assigned to View panning in the FSX control setting. I was wondering if it is possible to make the panning function conditional (upon another button being pressed) using fsuipc. I don't know if this helps, but when I look under axis assignment in the fsuipc options and settings, this hat switch is assigned to the P axis.

There's no inbuilt facility to make an assignment conditional on a button or switch or keypress. You would need to use a Lua plug-in. Something like this:

if logic.And(ipc.buttons(joystick number or letter), value of button) ~= 0 then

ipc.control(pan view control number, ipcPARAM)

end

where

joystick number or letter is the number of the joystick for the button you wish to use 9or letter if you are using joy letters),

value of button is the bit value for the button: 1 for button 0, 2 for button 1, 4 for button 2, .... etc (2^n), and

the pan view control number , which you can look up in the List of FS controls document, is 66416.

For example, if the button is joystick 3, button 7

if logic.And(ipc.buttons(3), 128) ~= 0 then

ipc.control(66416, ipcPARAM)

end

Save this in the FS Modules folder as, say, "panning.lua", then go to the Axis assignments tab, press the "reload" button to be sure that Lua file is recognised, and assign your axis P to "Lua panning".

I doubt if it will be as smooth as it should be, because of this indirection. There might be a smoother way, by having a continually running plug-in and sending it the axis values via LuaValue, but that is a bit more complicated, try the above first.

Regards

Pete

Share this post


Link to post
Share on other sites

thanks Pete that works great, and I really don't notice any difference in smoothness. One thing to mention, for anyone who might be interested in this procedure, be sure to remove the hat switch assignment in the FSX control.

I might also add that I am enjoying learning to program in FSUIPC and now LUA, thanks.

Share this post


Link to post
Share on other sites

I have my right view set up with my hat-switch and when i click on it it uncheck the check mark in the box  in configure joysticks option does any one know how to fix this so when i use my hat switch to view my Right view it doesn't uncheck it  also i made a video on youtube were i explain my problem HELP


 


Link 


 


                                                                                                                                                     Thank You


Share this post


Link to post
Share on other sites

 

I have my right view set up with my hat-switch and when i click on it it uncheck the check mark in the box  in configure joysticks option does any one know how to fix this so when i use my hat switch to view my Right view it doesn't uncheck it  also i made a video on youtube were i explain my problem HELP                                                                                          

 

I'm not sure if you are asking about some FSUIPC control assignment, or if this is really an EZDOK  question, in which case you are in the wrong place. It makes it more confusing adding to an existing thread which appears to be about a different subject?

 

Pete

Share this post


Link to post
Share on other sites

There's no inbuilt facility to make an assignment conditional on a button or switch or keypress. You would need to use a Lua plug-in. Something like this:

if logic.And(ipc.buttons(joystick number or letter), value of button) ~= 0 then

ipc.control(pan view control number, ipcPARAM)

end

where

joystick number or letter is the number of the joystick for the button you wish to use 9or letter if you are using joy letters),

value of button is the bit value for the button: 1 for button 0, 2 for button 1, 4 for button 2, .... etc (2^n), and

the pan view control number , which you can look up in the List of FS controls document, is 66416.

For example, if the button is joystick 3, button 7

if logic.And(ipc.buttons(3), 128) ~= 0 then

ipc.control(66416, ipcPARAM)

end

Save this in the FS Modules folder as, say, "panning.lua", then go to the Axis assignments tab, press the "reload" button to be sure that Lua file is recognised, and assign your axis P to "Lua panning".

I doubt if it will be as smooth as it should be, because of this indirection. There might be a smoother way, by having a continually running plug-in and sending it the axis values via LuaValue, but that is a bit more complicated, try the above first.

Regards

Pete

Pete,

 

Since we all know you suffer fools gladly, and I am one of those fools, I figured you would be pleased to show me the error of my thinking.

 

1. I recently read that  you could create a conditional assignment,  the value of a button conditional upon the Press/un-press of another, a topic which I am currently researching in the manual(s), so now your above statement thoroughly confuses me. please clarify.

 

2. I read here that letter assignments to joysticks can be done by simply changing the AutoAssignLetters=no to a yes

 

I assume this can be done,

A. AFTER you have been using FSUIPC for quite some time, and;

  1.will change all other references in the .ini accordingly, and;

  2. Will do so non-destructibly (recoverably)

 

yes?

 

Or,

 

B. must it be done early on in the use of FSUIPC?

 

 

Thanks,

Chas

Share this post


Link to post
Share on other sites
Since we all know you suffer fools gladly, and I am one of those fools, I figured you would be pleased to show me the error of my thinking.

 

That doesn't seem to be a very friendly or productive way of  introducing yourself, does it?

 

Also, it isn't really a good idea to post questions about entirely different subjects to the title of the thread? Surely your subject not even worthy of its own thread, which, with an appropriate title, might even attract answers from folks you might not find as offensive as I?

 

1. I recently read that  you could create a conditional assignment,  the value of a button conditional upon the Press/un-press of another, a topic which I am currently researching in the manual(s), so now your above statement thoroughly confuses me. please clarify.

 

Your entire quote from an earlier reply here by myself is actually out of context. The question was about the assignment of a hat to pan view, not determining the result of a button press.

 

You can make the action of a button conditional on another button, or even the value of an offset, but you cannot change the assignment itself. What the condition does is simply say whether the assignment it is attached to will activate or not. And conditions are only available for buttons, not axes.

 

2. I read here that letter assignments to joysticks can be done by simply changing the AutoAssignLetters=no to a yes
 
The use of letters instead of numbers has its own full chapter in the user guide and is pretty clear. What don't you understand?  

 

I assume this can be done,

A. AFTER you have been using FSUIPC for quite some time, and;

  1.will change all other references in the .ini accordingly, and;

  2. Will do so non-destructibly (recoverably)

 

yes?

 

Or,

 

B. must it be done early on in the use of FSUIPC?

 

Doesn't matter. Any time you like. Before you set that you are using numbers to refer to the joystick devices, after you change it you are using letters. It doesn't destroy anything, just changes numbers to letters and makes entries so it can change which devices they relate to should you plug them in differently next time, move machines, or change versions of Windows, all or any of which can change the ID numbers which Windows assigns.

 

As explained in the guide, you can let it do it automatically, so get A, B, C etc, or choose letters yourself, so Y for Yoke, R for Rudder, T for Throttle etc. All up to you. Please do use the User Guide for more information.

 

Pete

Share this post


Link to post
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...
Sign in to follow this  

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