Jump to content

Adding more custom controls


Torbjoern
 Share

Recommended Posts

3 minutes ago, Jeremy Carter said:

Will check it. Very different format in your ini file to mine..... wonder why?!?

I'm new to XP too: the IXEG is the aircraft that tempted me away from FSX/P3D!

Lots of new ways of doing things which is all quite confusing but cool too. ;-)

Any day spent inside trying to fix switches in a virtual world is a good day ;o)

Highly recommend using Notepad++ for editing. Keeps track of everything, changes and comments automatically. Simplifies changes when testing in the sim a lot. 

Link to comment
Share on other sites

I Recommend disabling all plugins except Python and XjoyMap. 

Copy my ini-file into the plugins/pythonscripts folder and remove all you have put there yourself. Remove any customized files in the aircraft folder and in the python folder making sure our setups are exactly the same. Try to map the buttons as usual and try again. If you still encounter any issues, then we do have a problem... 

Link to comment
Share on other sites

Still no success...

Did as you suggested: can map the buttons easily but when I exit and reload XP the button ABOVE the previously selected one is associated with that particular key.

To be clear: the button is now associated with the title of the secton, not with the actual button I chose in that section.

Tearing hair out here!!!!

Link to comment
Share on other sites

Odd... One thing would be clean copy of the Python plugin itself. Remove the folder, and launch xplane (in a wasteland airport to save time), and copy a fresh plugin from the web and start with the config-file I added earlier (without making changes) and trying again. Make sure to backup everything first. 

There are some caching issues in X-plane that can be confusing. See picture below as an example. The commands Turnoff 0-11 is not in my config anymore, but still in the menu. 

I'm sure that some experts will join in on our experiments and hopefully give us some much needed feedback. For now, everything is working on my part, but I can't get combined commands to works no matter how hard I try. 

Ps: There is a log file in the root Python folder. This is a great source to troubleshoot issues. I had one issue where I simply typed the dataref but missed one character in the process. The log pointed this out right away. 

Attach the log-file if you need a second pair of eyes. 

Capture.PNG

Link to comment
Share on other sites

I feel I owe you a few beers now!!

Attached is the log file. Loads of references to missing datarefs which is what led me to believe they were loading in the wrong order initially.

I've tried deleting every single key from XP (backed first of course!) but still the same issue of it being changed to the hierarchical name.

Will try a fresh python plugin.....

Link to comment
Share on other sites

Alright, so after Jeremy and I tried a couple of things earlier today, turns out that xjoymap struggles with binding keyboard commands and saving them after X-plane restart. My thoughts are that there are some limitations to the plugin on how i handles registrations of keys to commands with set values (ie. on/off etc). In other words, I haven't figured out how to define values for the keyboard instead of my joystick ;o) Further investigation will be done. 

One thing I'm struggling with is combining commands. For example, if I want to combine both turnoff lights into one command (one switch), there are several examples on how to do so. One in particular, that seems the most logical one, is to define the light as separate commands with different names, giving them the correct dataref and values of course as, then combining these two into a third command that puts them both together I mentioned earlier. There are several working examples (ie. the CRJ200 that combines both generator switches for instance), but for the life of me, I can't get it to work in the 733. I've tried to change the values in every direction, and change the value system itself (from on_value/off_value to value = 0, 1) and visa versa, but it simply does not work. 

Does anyone have some insights into this?

The example from the CRJ with my comments. I'n my config file, I changed the commands and datarefs to match the 733

;Creating the first command
[Elec Gen1 Switch]
new_command=crj200/electrical/Elec_Gen1_Switch
dataref=CRJ/elec/gen1_sw
values = 0, 1 
;Tried with on/off values as well

:Secong command
[Elec Gen2 Switch]
new_command=crj200/electrical/Elec_Gen2_Switch
dataref=CRJ/elec/gen2_sw
values = 0, 1

;Combining them both
[Elec Gen both Switch]
new_command=crj200/electrical/Elec_Gen_both_Switch
main_command=crj200/electrical/Elec_Gen1_Switch, crj200/electrical/Elec_Gen2_Switch
values = 0, 1
;Also tried to change values here to different types to see if this made any progress. It did not. 

If we are able to do this, it would be an extremely awesome feature. My plans are to combine turnoff-light, pitot heats, FLT/GRD, CabinSignal, strobes etc into one switch that I turn on/off when entering or exiting the runway. Would help reduce the workload dramatically. 

The spring-switch problem I had in earlier post, was solved by defining values (= 0, 1) in stead of setting on/off values. This is very useful, as one could for instance define that a button does something "while pushed" or "when pushed". 

 

  • Upvote 1
Link to comment
Share on other sites

Hi Ikari!

From what I can see, there are two commands for "horn cutout". I'm guessing the first one is for the warning of the cabin pressure (overhead) and the second one for altitude warning (pedestal). If I remember correctly, they should both have two states only (away from my X-plane computer at the moment). 

These commands are specified in the interface guide as:
ixeg/733/hydraulics/horn_cutout_act (guessing cabin pressure as it is categorized under hydraulics?)
ixeg/733/misc/alt_horn_co_act

If you check the two files uploaded in the first post of this thread, you should be able to quickly add them yourself. If not, I'm definitely adding the second one as I sometimes do low-level flying in the fjords of Norway ;o) 

When it comes to the Master Warning/Caution, I see several that might fit the bill (see comments.txt for all commands). 

These "might" be the cation (yellow) button for both sides. I'm also guessing that "recall" is for the caution panel that is next to it. 
ixeg/733/caution/caution_reset_act
ixeg/733/caution/caution_reset_cpt_act
ixeg/733/caution/caution_recall_act
ixeg/733/caution/caution_recall_cpt_act  

I haven't been able to find the master warning yet. But I'm certain that its buried in there somewhere ;o)

I need to look at this further, and figure out what command correlate to each button, but feel free to check it out yourself and report back the findings as I'm away from the X-plane computer until tomorrow. 

Sincerely

Torbjørn

  • Upvote 1
Link to comment
Share on other sites

  • 4 weeks later...
On 6/12/2016 at 10:29 PM, Jeremy Carter said:

Hi Torbjoern,

Came across this preference manager: http://forums.x-plane.org/index.php?/files/file/33305-x-plane-10-preferences-manager/

Very handy as it saves copying key preferences files for each individual aircraft once it's all set up.

 

Thanks Jeremy! 

Looks really very promising indeed. Keep 'em coming ;o)

 

  • Upvote 2
Link to comment
Share on other sites

  • 2 weeks later...

Hey guys,

 

after some fiddling I'm back in with this issue:

 

I installed 2 Pull levers (2 poles - 1 hardware switch command in XPLANE). Now I need to manipulate a float value with xjoymap.

I can set the ON position (when the switch is pressed and creating a positive edge trigger signal). But when I push it back in - no movement. Can you tell me how to create a "negative flank" on release?

 

This one does not work:


[Fuel Flow R]
new_command=Fuel Flow R
dataref=x737/cockpit/tq/rightCutoffLeverPos
description=Fuel Flow R
increment=1
increment *-1=-1
type=float
repeat=TRUE

 

On value is 1 - Off value is 0.

Thank you!

 

Tobi

  • Upvote 1
Link to comment
Share on other sites

@Tobizzle

I am no longer using xjoymap, i do use lua scripts instead. So i can not test for you.

 

But from my knowledge on xjoymap, this is what should work

 

[IXEG733_L_Cutoff]

loop = false

new_command=733_Lcutoff

dataref= ixeg/733/fuel/fuel_start_lever1_act

values = 0,1

 

[IXEG733_R_Cutoff]

loop = false

new_command=733_Rcutoff

dataref= ixeg/733/fuel/fuel_start_lever2_act

values = 0,1

 

 

hope this helps

 

  • Upvote 1
Link to comment
Share on other sites

10 hours ago, mmerelles said:

@Tobizzle

I am no longer using xjoymap, i do use lua scripts instead. So i can not test for you.

 

But from my knowledge on xjoymap, this is what should work

 

[IXEG733_L_Cutoff]

loop = false

new_command=733_Lcutoff

dataref= ixeg/733/fuel/fuel_start_lever1_act

values = 0,1

 

[IXEG733_R_Cutoff]

loop = false

new_command=733_Rcutoff

dataref= ixeg/733/fuel/fuel_start_lever2_act

values = 0,1

 

 

hope this helps

 

Yep, this look like a good solution to your problem Tobizzle. I'll check it later today. Just for my own understanding, your hardware is a switch with two positions or is it an axis? 

Mr. MMerelles, could you tell me more about the solution you use in Lua? I would really enjoy using a language to control these functions that gives me far more control than the "Config-scheme" used i Xjoymap. Today, joining simple commands can be a drag using XJoyMap, so any advice would be greatly appreciated! 

  • Upvote 1
Link to comment
Share on other sites

Alright. In that case, I would suggest you define the values for "On" and "Off". 

If you set "values = 0,1" there needs to be an interaction for both on and off. This is super useful if you have a hardware-button and you wish is to do something without the need for being pressed. I use it for instance for Dome-lights and FLT/GRD. If you on the other hand pre-set the values to "either this or that", the actual state of the button will reflect the state of the button in the aircraft without interaction. Sorry if the explanation is bad. My English is in no way perfect ;o)

Example:

I have a switch on my TM-hotas throttle. This is a switch that is either on or off. If I use the following line of code in Xjoymap, the strobe light will correspond to the switch-state when I load the SIM. I'm not sure if the cutoff switches are reported to the sim as axis, but give it a try (also try with values 0 and 1, or -1 and 0 if needed, depending on what the hardware actually reports to the sim)

****Example from my config****
new_command=Strobe Light
dataref=ixeg/733/lighting/strobe_lt_act
description=Strobe Light
on_value = 1
off_value = 0

In this example, if I load the SIM with the switch set to the upward position, the strobe light will be on. I use this when entering/exiting the runway, flick a switch and I'm all set ;)

****Will try later today, but could solve your problem****
new_command=Left Cutoff
dataref=ixeg/733/fuel/fuel_start_lever1_act
description=Left Cutoff Test
on_value = 1
off_value = 0

In this example, the switch you have will do the same thing, but for the cutoff lever (hopefully). If the desired state of the hardware does not reflect the desired state in the sim, simply change the values accordingly. 

Hope this helps, and I'll try it myself tonight. 

Sincerely

Torbjørn

Link to comment
Share on other sites

Confirmed! Works like a charm :)

Fun game: How long can you turn it off before the engine won't re-ignite?

 

 

new_command=Left Cutoff
dataref=ixeg/733/fuel/fuel_start_lever1_act
description=Left Cutoff Test
on_value = 1
off_value = 0

 

Edited by Torbjoern
Link to comment
Share on other sites

@Torbjoern @Jeremy Carter @Tobizzle

As you know every aircraft has different custom commands, datarefs and also requires different axis sensitivities, augmentation, for getting the best out of it.

You also require to set the same buttons on your yoke or keys to different things on a per aircraft basis (i.e. Ap_disc, TOGA, etc) , also the levers are different on a per aircraft basis, when loading a Cessna 172 i use a push/pull TQM throttle from saitek, but when loading a twin jet i use a TQM from Goflight.

So i made a lua script that every time you load an aircraft it reads the aircraft icao tag (B733, C172, B721, B722, etc.) and set everything for that aircraft based on profiles of my liking.

 

For fuel cutoff, i use always the same 2 physical switches that comes on the saitek. Based on the aircraft profile i assign them properly to work for FJS737, FF757/767/777, IXEG733, etc

 

For the IXEG in particular this is what i use:

 

---- IXEG PROFILE

    create_switch( 467, "ixeg/733/fuel/fuel_start_lever1_act", 0, 1, 0 )
    create_switch( 468, "ixeg/733/fuel/fuel_start_lever2_act", 0, 1, 0 )

-----

 

-467 & 468 = is the id-value xplane assigned to each switch. You know that value by going to joystick & assignment, buttons adv tab and flipping the switches. Xplane display the value on the top left corner

-Then you have the dataref you will set the values to. I change the dataref for the right one based on the aircraft i am loading. Profiles.

-First value is the index, unless you are modifying an array of datarefs it is always 0

-Second value es the OFF position. I use 1 (on) to the off position because the saitek switches are on when flipped down and off when flipped up. This is opposite how any jet works. You flip up to make the fuel run, you flip down for cutoff.

-Third value is the ON position. As said above i use it inverted to be intuitive flipping the switch as per the real aircraft.

 

hope this helps.

 

Link to comment
Share on other sites

Hey guys,

I finally found the solution for me - thank you for your help.

I am using this one now:

 

[Fuel Flow R]
new_command=Fuel Flow R
dataref=x737/cockpit/tq/rightCutoffLeverPos
description=Fuel Flow R
on_value=1
off_value=0
type=float
repeat=TRUE

Seems you have to tell xjoymap specially if you are handling a float value :-))).

Thank you so much!

And just to show you what you are all helping with:

 

 

image2.JPG

 

image1.JPGimage1.JPG

 

image2.JPG

Tobi

  • Upvote 1
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.

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...