Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

F1VC.xml - 3D Cockpit Knobs and Keys - tips and tricks

Featured Replies

I have found that some airplanes converted from F1 to RXP GTN have a problem with recognizing the Direct-To and Home buttons when clicked, even when one of the nifty translation programs for the buttons/knobs is used.  A double-click often works, but a single click does not.

After trying various things, I have now gone to the Interior Model files and trough trial and error found that making some simple edits fixes the situation.

The standard code for the Direct-To button looks like this:

Direct-To Key       

(M:Event) 'LeftSingle'  scmp 0 == if{ 0x0001FA03 (>L:F1GTNMOUSE, bool) ....

(M:Event) 'LeftRelease'  scmp 0 == if{ 0x0001FA04 (>L:F1GTNMOUSE, bool) ...       

(M:Event) 'Leave'  scmp 0 == if{ 0x0001FA04 (>L:F1GTNMOUSE, bool) ...      

(M:Event) 'LeftDrag'  scmp 0 == if{ 0x0001FA04 (>L:F1GTNMOUSE, bool) ...   

If you rename the last three F1GTNs to F2GTN.. then the single click works like a charm :happy:

I am sure that FXGTN would work just as well..

Same for the Home key!

 

Edited by RXP

Bert

  • Replies 98
  • Views 19k
  • Created
  • Last Reply

Awesome work. This has bugged me especially on my RealAir Legacy. 

Thanks,

Bruce

[CPL]  I9-9900K @5.0GHz HT ON, Maximus XI Hero, ASUS TUF RTX4080 OC, 32GB DDR4 3200 14, 1TB NVMe SSD, 500GB SSD, 1TB HDD, 40" Samsung 4K TV, Honeycomb Alpha & Bravo, Logitech Rudder Pedals, WIN11

  • Author

Yup, the Legacy is one of them, on my system also.. :happy:

Still wonder:  Why?

 

Bert

  • Author

For the Legacy, I simply use this routine:

<Gauge Name="GTN 750 buttons" Version="1.0">

<!-- Trigger GTN 750 commands -->
   
<Element>
     <Select>
      <Value>

  (L:F1GTNMOUSE, number)  129539 ==  if{
  1 (>K:GPS_DIRECTTO_BUTTON)
  0 (>L:F1GTNMOUSE, number) }

 (L:F1GTNMOUSE, number)  129537 ==  if{
  1 (>K:GPS_MENU_BUTTON)
  0 (>L:F1GTNMOUSE, number) }
          
      </Value>      
     </Select>
   </Element>
</Gauge>

 

Edited by RXP

Bert

  • Author

F1VC.xml gauge: Source Code                                                                                                                         

Open notepad, copy/paste the following, save as F1VC.xml file into the P3D Gauges folder.

And if you want the knobs as well.. this seems to work:

<Gauge Name="RXP_Buttons_Knobs" Version="3">

<!-- Reality XP GTN Buttons Bridge -->
<!-- Bridges Reality XP GTN 750/650 Touch with f1 3D bezel -->
<!-- Credits: Reality XP, Sean Moloney, Ryan Butterworth and Bert Pieké -->

<Element>
  <Select>
    <Value>
        (L:F1GTNMOUSE,bool) 0 !=
        if{

     (L:F1GTNMOUSE, number)  129539 ==  if{
     1 (>K:GPS_DIRECTTO_BUTTON)
     0 (>L:F1GTNMOUSE, number) }

    (L:F1GTNMOUSE, number)  129537 ==  if{
    1 (>K:GPS_MENU_BUTTON)
    0 (>L:F1GTNMOUSE, number) } }

   (L:F1GTNMOUSE,bool) 0 !=
        if{
            (L:F1GTNMOUSE,bool) 0x0001FA01 - sp0
            l0 28 / int sp1 l0 28 % sp0
            <!-- map F1 model to RXP GTN unit -->
            <!-- use: 8 0 8 0 for 652=unit2, 651=unit1, 752=unit2, 751=unit1 -->
            <!-- use: 8 8 0 0 for 652=unit2, 651=unit2, 752=unit1, 751=unit1 -->
      		8 0 8 0
      		4 l1 case 4 2 l0 1 &amp; ? + sp1
            l0 0 == l0 1 == or if{ l1 (>K:GPS_MENU_BUTTON) }
            l0 2 == l0 3 == or if{ l1 (>K:GPS_DIRECTTO_BUTTON) }                
            l0 4 == l0 10 == or if{ l1 8 &amp; (>K:GPS_BUTTON2) }
            l0 6 == l0 11 == or if{ l1 8 &amp; (>K:GPS_BUTTON3) }
            l0 8 == l0 9 == or if{ l1 (>K:GPS_BUTTON1) }
            l0 12 == l0 18 == or if{ l1 8 &amp; (>K:GPS_GROUP_KNOB_DEC) }
            l0 14 == l0 19 == or if{ l1 8 &amp; (>K:GPS_GROUP_KNOB_INC) }
            l0 20 == l0 26 == or if{ l1 8 &amp; (>K:GPS_PAGE_KNOB_DEC) }
            l0 22 == l0 27 == or if{ l1 8 &amp; (>K:GPS_PAGE_KNOB_INC) }
            l0 24 == l0 25 == or if{ l1 (>K:GPS_CURSOR_BUTTON) }    
            l0 16 == l0 17 == or if{ l1 (>K:GPS_CURSOR_BUTTON) }    
            0 (>L:F1GTNMOUSE,bool)            
        }           
    </Value>      
  </Select>
</Element>
</Gauge>

 

Edited by RXP
code formatting

Bert

Bert you're a machine!

My Liveries | FAA ZMP | PPL ASEL |
| Windows 11 | MSI Z690 Tomahawk | 12700K 4.7GHz | MSI RTX 4080 | 64GB 6000 MHz DDR5 | 500GB Samsung 860 Evo SSD | 2x 2TB Samsung 970 Evo M.2 | EVGA 850W Gold | Corsair 5000X | HP G2 (VR) / LG 27" 1440p |

 

 

  • Author

And just confirmed that the following two lines can be safely deleted:

            l0 0 == l0 1 == or if{ l1 (>K:GPS_MENU_BUTTON) }
            l0 2 == l0 3 == or if{ l1 (>K:GPS_DIRECTTO_BUTTON) }          

..since they are being tested earlier.

Bert

Hi Bert,

thank you for going the extra leg with this and for sharing with others!

I'm trying to figure out the issue at hand and this raises a few comments/questions:

 

1) This code is handling both press and release events:

            l0 0 == l0 1 == or if{ l1 (>K:GPS_MENU_BUTTON) }
            l0 2 == l0 3 == or if{ l1 (>K:GPS_DIRECTTO_BUTTON) }  

 

2) This code is handling only press events (F1) and translate them to press-and-release events (RXP):

     (L:F1GTNMOUSE, number)  129539 ==  if{
     1 (>K:GPS_DIRECTTO_BUTTON)
     0 (>L:F1GTNMOUSE, number) }

    (L:F1GTNMOUSE, number)  129537 ==  if{
    1 (>K:GPS_MENU_BUTTON)
    0 (>L:F1GTNMOUSE, number) } }

NB: you should use 0 (>K:GPS_xxxxx) because 1 is not used. (please note this won't work for GTN #2)

 

3) The issue could also be just related to the way the f1 GTN is interfacing: it expects the 3D model to write a value in a variable which it polls to trigger an action. Therefore, it can't poll quickly enough 2 changes in a row and this is a strong limitation of this implementation (say you press and release the button before it polls the variable, the f1 GTN would just see the 'release' value...) This is why we've implemented our interface using a true event-based system. No matter how fast you click the buttons, all the associated events gets routed to the RXP GTN and none is lost!

 

Q: does it means this aircraft 3D model with the other GTN is not handling 'long presses' on the HOME button for example? 

If it does, it should write the value 129540 when releasing DTO and 128538 when releasing HOME buttons in the 3D cockpit. Otherwise, this most likely explains why it requires 2 presses on the button, because the 'translation' code is capturing the press event, sends the press command, then the release event is never coming back, and the GTN waits for the key to release.

Edited by RXP

  • Author

Hi Jean Luc,

Looking at it more closely, I believe that this "double click" issue existed with the "other" GTN as well.  Just tested with the Turbine Duke where I have not touched the Interior Model file and have the "other" GTN installed.  A long click on the Home button accomplishes nothing (in the VC). 

In the popup version, all the clicks, including the long Home click work correctly.

This is the code in the TDuke model file:

Home Key
(M:Event) 'LeftSingle'  scmp 0 == if{ 0x0001FA01 (>L:F1GTNMOUSE, bool) }        
(M:Event) 'LeftRelease'  scmp 0 == if{ 0x0001FA02 (>L:F1GTNMOUSE, bool) }        
(M:Event) 'Leave'  scmp 0 == if{ 0x0001FA02 (>L:F1GTNMOUSE, bool) }        
(M:Event) 'LeftDrag'  scmp 0 == if{ 0x0001FA02 (>L:F1GTNMOUSE, bool) }

Edited by Bert Pieke

Bert

I have been using an earlier version of the RXP_Buttons_Knobs routine in the Legacy for a while now (thanks @ryanatcund) but it requires double clicks. Today I tried your modified version and it also requires double clicks for me, but when I double press then hold the Home button in the earlier version I get the map page, with your modified version it does not. What am I doing wrong? Why double clicks with those routines?

Also, I tried editing the interior vc MDL file with a text editor, changing all the Direct-to and Home routines as you were indicating above but no joy.  Are the interior files you're editing xml's?

[CPL]  I9-9900K @5.0GHz HT ON, Maximus XI Hero, ASUS TUF RTX4080 OC, 32GB DDR4 3200 14, 1TB NVMe SSD, 500GB SSD, 1TB HDD, 40" Samsung 4K TV, Honeycomb Alpha & Bravo, Logitech Rudder Pedals, WIN11

  • Author
3 hours ago, bbuckley said:

 

Also, I tried editing the interior vc MDL file with a text editor, changing all the Direct-to and Home routines as you were indicating above but no joy.  Are the interior files you're editing xml's?

The model files are mdl files that can only be edited with a Hex Editor, like HxD.

This is tricky business.. you cannot delete or insert characters, only replace..

Maybe someone can figure out how to do this without touching the model file..

 

Bert

12 hours ago, Bert Pieke said:

A long click on the Home button accomplishes nothing (in the VC). 

This somewhat confirms my thoughts.

Either the aircraft model code was just copy/pasted as-is without any further consideration of what it does, and they have forgotten to code the click region to handle the mouse 'release' event,

or

I believe the double click the culprit is this:

12 hours ago, Bert Pieke said:

(M:Event) 'LeftDrag'  scmp 0 == if{ 0x0001FA02 (>L:F1GTNMOUSE, bool) }

If you ever move the mouse 1 pixel while clicking, it will 'release' the button. You might want to try clearing up this one line of code and see how it works then.

Besides, 'mouse leave' event is necessary otherwise if may never release the button in some cases (the cockpit moves underneath your mouse cursor).

  • Author
11 hours ago, Bert Pieke said:

The model files are mdl files that can only be edited with a Hex Editor, like HxD.

This is tricky business.. you cannot delete or insert characters, only replace..

Maybe someone can figure out how to do this without touching the model file..

 

Also, the RealAir model files have four sections for the GTN buttons.. 650U1, 650U2, 750U1, 750U2..

Only the section that corresponds to your installed GTN option matters (I believe..)

Bert

  • Author
3 hours ago, RXP said:

I believe the double click the culprit is this:

(M:Event) 'LeftDrag'  scmp 0 == if{ 0x0001FA02 (>L:F1GTNMOUSE, bool) }

If you ever move the mouse 1 pixel while clicking, it will 'release' the button. You might want to try clearing up this one line of code and see how it works then.

Besides, 'mouse leave' event is necessary otherwise if may never release the button in some cases (the cockpit moves underneath your mouse cursor).

BINGO! 

You nailed it.. :biggrin:

If I only disable that one line, but leave the other lines, not only does the original F1VC code work again, but the long hold for the Home button works as well!

Updated instructions to follow for adventurous "aircraft owners"..

Bert

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.