December 5, 20223 yr Hi, Great piece of software, love it. Is it possible to set the LED status on a per layer basis on the X-Touch Mini? Is there a test for the active layer? I've programmed certain LEDs to illuminate, but the same LEDs stay on when I switch layer. Thanks, Daz
December 5, 20223 yr Hi Daz, you can not identify if you are selected Layer A or B on the XTouch. So if you want to show different LED output, then you have to track this yourself (for example create your own variable, e.g. (L:XTouch_Layer), and set it via script. But will never be 100% accurate.) Then in the LED code you do something like (L:XTouch_Layer) 0 == if { LED Code for Layer A } (L:XTouch_Layer) 1 == if { LED Code for Layer B } But as mentioned, the hard part will be to set this variable properly. This is one of the reasons I chose to use MC mode for my XTouch Gauge and implement this layer stuff manually...Regards, Thomas
December 5, 20223 yr Author 13 minutes ago, Funatic said: Hi Daz, you can not identify if you are selected Layer A or B on the XTouch. So if you want to show different LED output, then you have to track this yourself (for example create your own variable, e.g. (L:XTouch_Layer), and set it via script. But will never be 100% accurate.) Then in the LED code you do something like (L:XTouch_Layer) 0 == if { LED Code for Layer A } (L:XTouch_Layer) 1 == if { LED Code for Layer B } But as mentioned, the hard part will be to set this variable properly. This is one of the reasons I chose to use MC mode for my XTouch Gauge and implement this layer stuff manually...Regards, Thomas Thanks Thomas. Are the layer buttons picked up by A&Os. If I always make sure the unit is on layer A at start I could then track the layer changes? I am not really sure what the MC mode is.
December 5, 20223 yr No, there is no way to track from AAO which layer has been selected. Either use an additional button to switch the layer variable (means you have to press 2 buttons, one Layer button to change the layer and then another button to toggle the layer variable). Or - i would prefer this one - on every script triggered by the button, set the variable before executing the planned action. e.g. if you have Button 9 for FD on/off on Layer A and Strobe Lights on Layer B. Assume script for Button 9 on Layer A is (pseudo code, not working!) (L:FD, bool) ! (>L:FD, bool) ! and Button 9 on Layer B is (L:Strobe, bool) ! (>L:Strobe, bool) then change this code to something like 0 (>L:XTouch_Layer) (L:FD, bool) ! (>L:FD, bool) ! and Button 9 on Layer B to 1 (>L:XTouch_Layer) (L:Strobe, bool) ! (>L:Strobe, bool) So whenever you press a button, the layer variable will be set accordingly. However, if you switch layer but do NOT press any button, then the layer variable will NOT be adjusted... Got the idea? MC mode is a compatibility mode and is active if the MC Mode LED is lit (above the Layer A/B buttons) Regards, Thomas
December 6, 20223 yr Author OK, I think I've got that, thanks. So everything on Layer A set the layer variable to 0, and then 1 for each button action on Layer B. Then check this variable in the LED scripts to enable LEDs per layer. Making sure, in an ideal world, that when the layer is manually changed I press a button in that layer to set the variable. Regards, Daz
December 6, 20223 yr yes, this is the only way I can think of keeping track which layer is currently active. As an alternative you can try if my gauge fits for you: X-Touch Mini Gauge for use with AAO (Axis and Ohs) » Microsoft Flight Simulator Unlimited number of layers, easy LED configuration depending on layer.... Regards, Thomas
December 6, 20223 yr Author 1 minute ago, Funatic said: yes, this is the only way I can think of keeping track which layer is currently active. As an alternative you can try if my gauge fits for you: X-Touch Mini Gauge for use with AAO (Axis and Ohs) » Microsoft Flight Simulator Unlimited number of layers, easy LED configuration depending on layer.... Regards, Thomas OK, thanks, I'll take a look. I suppose I could set the layer variable on the key up event? Regards, Daz
December 6, 20223 yr Hi Daz, yes, you can use the key up event or you can create a script including the var set as well as the "original" command and use this one for the keydown - both options will work... Regards, Thomas
December 9, 20223 yr If you don't use Funatics Framework for the XTouch Mini, there is also an easy Option to control the LEDs on a per Layer Basis without it. I've described the Solution here in this Forum. Essentially you're using the default Omni Channel for the XTouch Mini, which is Channel 11, instead of Midi-Channel 1, and different Key numbers, which are: LAYER A Encoder 0 - 7 Buttonrow up: 8 - 15 Buttonrow down: 16 - 23 LAYER B Encoder Buttonrow up: 32 - 39 Buttonrow down: 40 - 47 @FunaticSee you on Sunday 😉 Edited December 9, 20223 yr by theflyguy
December 9, 20223 yr Hi @theflyguy, this might work fine for the buttons - but I can not recommend for the rotaries. What you are doing by using channel 11, is not setting the lights but setting the rotary - and the XTouch is then taking care of the LEDs itself. In Std mode the encoders are working like an axis. Sending values between 0 (leftmost) and 127 (rightmost). When sending a value to that channel 11, it does reset this internal position to that value. So far all good. Now you need to know, how AAO is detecting left turn/right turn - and it is doing this by comparing previous rotary value to current rotary value. If the number is increasing, then you are turning right. If the number is decreasing, then you are turning left. And now let's do an example: XTouch encoder is exactly in middle position, so it is sending value 64. You turn to the left - so next value received is 63. Which is smaller than 64, so left turn detected. Next "tick", value 62 - smaller than 63, so again left turn. NOW you are sending a new position to set the LED. Assume this leads to internal position 64. What's happening now, when you turn another tick to the left? XTouch will send value 63 - and this value is HIGHER than the one received before (62). And this will be interpreted as a RIGHT turn. So doing this will lead to strange behavior of the rotary - especially if turned fast.... 🙂 Regards, Thomas
December 9, 20223 yr Hi @Funatic, the inital Question was about controlling the LEDs on each Layer separately. Thats exactly was my suggested Solution does. No need to test for the active Layer, just use Channel 11 and different Numbers than usual for the LEDs. LEDs will illuminate or extinguish when the Layer is changed, dependenig on Aircraft State, given you are using the correct automated Scripts for the Aircraft.. The LEDs are the only Thing on the XTouch Mini, that are controlled directly via native Midi Commands. Button, Encoders etc. are a different Story. They are treated as different Buttons (and Encoders) on each Layer anyway by AAO. No need to do anything with Midi Channel 11 for them. Maybe you're right when it comes to the LEDs of the Encoders, but I've never used them before, because they don't make much Sense for Encoders, that are used as "endless" Enoders i.e. for dialing in the Altitude for the AP. No need to argue. I wlll show you that it's working soon. Edited December 9, 20223 yr by theflyguy
December 10, 20223 yr Author On 12/9/2022 at 12:12 PM, theflyguy said: If you don't use Funatics Framework for the XTouch Mini, there is also an easy Option to control the LEDs on a per Layer Basis without it. I've described the Solution here in this Forum. Essentially you're using the default Omni Channel for the XTouch Mini, which is Channel 11, instead of Midi-Channel 1, and different Key numbers, which are: LAYER A Encoder 0 - 7 Buttonrow up: 8 - 15 Buttonrow down: 16 - 23 LAYER B Encoder Buttonrow up: 32 - 39 Buttonrow down: 40 - 47 @FunaticSee you on Sunday 😉 Hi, I cannot seem to get this to work at all. I must be missing something simple. It all works fine when sending on channel 1, 0 -15. This is my PMDG 737 script so far for LEDs per layer, and I cannot get the LEDs to illuminate: Layer A ---- (L:switch_378_73X,·number)·0·==·if{·1·(>MIDI:3:NoteOn:11:16)}·els{·0·(>MIDI:3:NoteOn:11:16)} (L:switch_380_73X,·number)·0·==·if{·1·(>MIDI:3:NoteOn:11:20)}·els{·0·(>MIDI:3:NoteOn:11:20)} (L:ngx_MCP_HdgSel,·number)·0·==·if{·0·(>MIDI:3:NoteOn:11:13)}·els{·1·(>MIDI:3:NoteOn:11:13)} (L:ngx_MCP_CMDA,·number)·0·==·if{·0·(>MIDI:3:NoteOn:11:21)}·els{·1·(>MIDI:3:NoteOn:11:21)} (L:ngx_MCP_LvlChg,·number)·0·==·if{·0·(>MIDI:3:NoteOn:11:22)}·els{·1·(>MIDI:3:NoteOn:11:22)} (L:ngx_MCP_VORLock,·number)·0·==·if{·0·(>MIDI:3:NoteOn:11:15)}·els{·1·(>MIDI:3:NoteOn:11:15)} (L:ngx_MCP_App,·number)·0·==·if{·0·(>MIDI:3:NoteOn:11:23)}·els{·1·(>MIDI:3:NoteOn:11:23)} (L:ngx_MCP_AltHold,·number)·0·==·if{·0·(>MIDI:3:NoteOn:11:14)}·els{·1·(>MIDI:3:NoteOn:11:14)} Layer B ---- (A:LIGHT·LOGO,·Bool)·0·==·if{·0·(>MIDI:3:NoteOn:11:32)}·els{·1·(>MIDI:3:NoteOn:11:32)} (A:LIGHT·STROBE,·Bool)·0·==·if{·0·(>MIDI:3:NoteOn:11:33)}·els{·1·(>MIDI:3:NoteOn:11:33)} (A:LIGHT·BEACON,·Bool)·0·==·if{·0·(>MIDI:3:NoteOn:11:34)}·els{·1·(>MIDI:3:NoteOn:11:34)} (A:LIGHT·WING,·Bool)·0·==·if{·0·(>MIDI:3:NoteOn:11:35)}·els{·1·(>MIDI:3:NoteOn:11:35)} Any help greatly appreciated. Regards, Daz Edited December 10, 20223 yr by Dazzlercee23
December 10, 20223 yr Author OK, I've sorted it, thanks. My notes were all set incorrectly in the X Touch Editor lol. Edited December 10, 20223 yr by Dazzlercee23
Archived
This topic is now archived and is closed to further replies.