Jump to content
Sign in to follow this  
Bert Pieke

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

Recommended Posts

2 hours ago, RXP said:

Which makes me wondering why, but... 

For clarification, below are the lines I 'removed' from the Lear35 interior model file to get the GTN750 Home/Map button to work correctly. This is for an aircraft that has the RXP GTN750 installed directly in the VC panel -- no conversion from another GTN750 involved (although there is corresponding code in the interior model file for a different GTN since the user can directly install whichever GTN they own into the panel). I assume these code lines are from the GTN code provided by RXP and not written by the aircraft developer:

(M:Event) 'LEFTDRAG'  scmp 0 == if{ 4 (>K:GPS_MENU_BUTTON) 0 (>L:RXP_GTN_HME_BUTN_1, number) }   
(M:Event) 'RELEASE'    scmp 0 == if{ 4 (>K:GPS_MENU_BUTTON) 0 (>L:RXP_GTN_HME_BUTN_1, number) }

Al

 

Edited by ark

Share this post


Link to post
Share on other sites

Just wondering...

As I mentioned above for the Lear35, the user can install whichever GTN750 they own into the VC panel. And since in each case the GTN shows up in the same location, I assume the click spot locations for the Home and Direct-To keys will be about the same. So I was wondering if there was any chance this could lead to some kind of a bizarre conflict with the mouse event behavior even though the associated code ( Lvars ) are certainly different?

Al

Edited by ark

Share this post


Link to post
Share on other sites
23 minutes ago, ark said:

I assume these code lines are from the GTN code provided by RXP and not written by the aircraft developer:

You are correct, this is verbatim what's in our canonical modeldef.xml.

The whole discussion shows there is something wrong 'somehow' in intercepting the 'drag' event as it is done right now and there is good reason to probably revisit our canonical code for this reason like I've written a few posts back in the discussion.

In both GTN canonical code, as it is right now, the 4 events are intercepted for each buttons (press, release, drag and leave) and the code running for 'drag' is 'releasing' the button, which seems wrong. Instead if it was 'pressing' the button this wouldn't cause any problem with our GTN because it will just press an already pressed button (from the left click event), which in turn won't change anything on our GTN buttons. But maybe the other GTN code required the 'drag' event being coded to releasing the button because of the poorer 'variable' based interface or just because of mis-understanding between the aircraft vendors and the developper.

 

31 minutes ago, ark said:

below are the lines I 'removed' from the Lear35 interior model file to get the GTN750 Home/Map button to work correctly. 

(M:Event) 'LEFTDRAG'  scmp 0 == if{ 4 (>K:GPS_MENU_BUTTON) 0 (>L:RXP_GTN_HME_BUTN_1, number) }   
(M:Event) 'RELEASE'    scmp 0 == if{ 4 (>K:GPS_MENU_BUTTON) 0 (>L:RXP_GTN_HME_BUTN_1, number) }

This makes it simpler indeed. In this case you only have 2 events governing: the left click presses the button, and any other action releases it (moving the mouse out the button click spot for example).

Are you sure in this case, releasing the left mouse button while being 100% steady (no mouse moving) is releasing the GTN button? If so, this means releasing the button is interpreted as a 'leave' event then. Could this be a behaviour differing between different versions of FltSim (from FSX to P3D4.5) ?

At this point I can't experiment with an aircraft model and compile the model to test in FS so this is all based on assumptions and experimentations, but I suspect the 3D model code should probably swallow the 'drag' event (i.e. set it in <MouseFlags> but don't run any code if the event is happening).


Jean-Luc | reality-xp.com
This message from Reality XP is protected by a disclaimer: reality-xp.com/aboutrealityxp/email.html

Let your voice be heard and help us make a difference for you: Vote !
Open up communications with Reality-XP (Microsoft Flight Simulator Forums)

Share this post


Link to post
Share on other sites
21 minutes ago, RXP said:

Are you sure in this case, releasing the left mouse button while being 100% steady (no mouse moving) is releasing the GTN button?

Yes.

With the mouse drag code removed as discussed above:

- Clicking and quickly releasing the Home button takes you to the Home page.

- Holding down the Home button takes you to the Map page and then releasing the mouse without any drag type mouse movement releases the Home button as well.

- If you are already on the map page, quickly clicking and releasing the Home button takes you 'back' to the Home page, or if you press and hold the Home button while already on the map page, you go back to the Home page once you release the Home button. All without any mouse drag type movement.

In all cases, animation of the Home button seems correct.

Al

Edited by ark

Share this post


Link to post
Share on other sites
17 minutes ago, ark said:

In all cases, animation of the Home button seems correct.

Thank you for the additional feedback. This means the 'leave' event is generated if you release the mouse button, and not just when you move the mouse out the click spot area.

Can you try cross-checking this then: instead of releasing the mouse button, keep the left button down but move the mouse out the click spot area, and only once out, after say a few seconds, release the mouse button. 

This will validate the 'leave' event is still firing ok (well not entirely but a good start to try)

Eventually, you might cross check just keeping the LeftSingle and the LeftRelease, and remove the LeftDrag and the Leave events, check these are also working ok on their own (requires not moving the mouse), and once validated, try the procedure above in moving out the mouse from the click spot area to find out whether P3D4 is firing a 'release' event when it is actually detecting a 'leave' event.

Edited by RXP

Jean-Luc | reality-xp.com
This message from Reality XP is protected by a disclaimer: reality-xp.com/aboutrealityxp/email.html

Let your voice be heard and help us make a difference for you: Vote !
Open up communications with Reality-XP (Microsoft Flight Simulator Forums)

Share this post


Link to post
Share on other sites
2 hours ago, bbuckley said:

Edited the RealAir Legacy .mdl files as @Bert Pieke said above and installed v2.05 f1vc.xml and it works single click and home click and hold just perfectly. Thanks Bert!

BTW, @RXP, your engagement with users on this forum is awesome! Thanks!

Bruce

Happy it worked!  This is tricky business :unsure:

  • Like 1

Bert

Share this post


Link to post
Share on other sites
5 minutes ago, RXP said:

Thank you for the additional feedback.

Eventually, you might cross check just keeping the LeftSingle and the LeftRelease, and remove the LeftDrag and the Leave events, ..

Jean Luc,  thanks for continuing the dialogue!

Lobbying 3rd party vendors is OK, but many of us have a hangar full of planes that we like to fly, and in the case of RealAir, there is no longer a vendor to lobby..

I am sorry to tell you that your gauge still refuses to honour the long Home push, even in the popup (!), after a Map Page, Direct-To, Cancel sequence.. no big deal.. but maybe something to look into.. :happy:

The simplest way I have found to disable the Drag Event for existing airplanes, is this:

Search for "Direct" and "Home" keys (there may be more than one) in the Interior Model code and in the (M:Event) 'LEFTDRAG'  scmp 0 == line, replace 0 by 7.

That is one character replaced for each 'LEFTDRAG' event found.

Maybe someone can find a simpler way.. but that is the best I can do :cool:


Bert

Share this post


Link to post
Share on other sites
31 minutes ago, RXP said:

Can you try cross-checking this then: instead of releasing the mouse button, keep the left button down but move the mouse out the click spot area, and only once out, after say a few seconds, release the mouse button. 

This will validate the 'leave' event is still firing ok (well not entirely but a good start to try)

This works correctly with the drag code removed as described above: I held down the Home button, the map appeared, moved the mouse a few inches down the screen, then after 5 seconds released the mouse and the Home button then 'popped' back out as it should.

Al

Edited by ark

Share this post


Link to post
Share on other sites
4 hours ago, RXP said:

 

Otherwise the issue might also be related to how the 3D model is handling the mouse events and is maybe deciding to 'remove' some of the events given the combination it is registered with. In effect, not only there is the code to test each event 'type' by string, but the whole code block is also registered with all the events it is supposed to intercept.

In this case the modeldef.xml entry looks like this:

<MouseFlags>LeftSingle+LeftRelease+LeftDrag+Leave</MouseFlags>
<CallbackCode>
  ....
</CallbackCode>

It is possible the mere mention of 'LeftDrag' in the list of flags is sufficient to cause Flightsim code handling the 3D model interactions to handling the mouse differently than expected in regard to the 'release' and 'leave' events:

 

I can find no mention of Mouseflags anywhere in the Interior Model code.. so that is not accessible to me.. but invalidating the LeftDrag scmp 0 == code appears to be a simple and reliable way to solve the issue..  Not pretty maybe, but if it gets the job done :unsure:


Bert

Share this post


Link to post
Share on other sites
4 minutes ago, Bert Pieke said:

am sorry to tell you that your gauge still refuses to honour the long Home push, even in the popup (!), after a Map Page, Direct-To, Cancel sequence.. no big deal.. but maybe something to look into..

Bert,

With the mouse LeftDrag code removed as discussed above, I can't replicate your problem in either the VC or popup. Maybe I'm not understanding your sequence of events.

- If I'm on the Home page, press Direct-To, Cancel, then hold the Home button I go to the map page.

- If I'm on the map page, press Direct-To, Cancel, then hold down the Home button on release I go back to the Home page.

Or maybe the problem you are talking about only happens when you replace some other GTN750 with the RXP unit??

Al

Share this post


Link to post
Share on other sites
7 minutes ago, ark said:

Bert,

With the mouse LeftDrag code removed as discussed above, I can't replicate your problem in either the VC or popup. Maybe I'm not understanding your sequence of events.

- If I'm on the Home page, press Direct-To, Cancel, then hold the Home button I go to the map page.

- If I'm on the map page, press Direct-To, Cancel, then hold down the Home button on release I go back to the Home page.

Or maybe the problem you are talking about only happens when you replace some other GTN750 with the RXP unit??

Al

Hi Al,

Maybe this is unique to my system.. but either way, it is not a big deal.

Lets return the discussion to the topic at hand... how do inexperienced users fix their existing airplanes in a simple and hopefully foolproof way?  :happy:


Bert

Share this post


Link to post
Share on other sites

This is interesting (maybe  😉 ).

With the original interior model file (no mouse LeftDrag code removal) the first click of the Home or DTO button shows NO animation of the button although a single click will take you to the Home or Direct-To page as expected. In both cases it takes a double click to see any button animation. With the LeftDrag and Leave code removed for the Home and DTO buttons, you do get correct button animation with the first button 'push'.

Al

Share this post


Link to post
Share on other sites
3 hours ago, Bert Pieke said:

Lets return the discussion to the topic at hand... how do inexperienced users fix their existing airplanes in a simple and hopefully foolproof way? 

Good question! I can't think of any simpler change than your "Search for "Direct" and "Home" keys (there may be more than one) in the Interior Model code and in the (M:Event) 'LEFTDRAG'  scmp 0 == line, replace 0 by 7" suggestion".

However, asking the average person without some computer experience to make this change with a text editor is problematic. I wonder if a program could be written to search an interior model file and make the necessary changes? This program would also automatically make a backup of the original interior model file so the user could easily 'go back' if necessary. This 'go back' feature would be an option the program would provide if the user chose to do so for whatever reason.

Al

Edited by ark

Share this post


Link to post
Share on other sites

Nice idea... I just did the Alabeo Ovation, and it had some 8 instances of Home and Direct-To button sections.. why?  I have no idea..

Important note to add for any DIY aircraft owners out there:

THE EASIEST THING TO OVERLOOK is forgetting to set the RXP GTN to "Use GPS Commands" in the little customization app :huh:

After all the careful editing in the Interior Model, and in the panel.cfg file.. if it does not work..  CHECK THIS FIRST :cool:

  • Like 1

Bert

Share this post


Link to post
Share on other sites
3 hours ago, RXP said:

Thank you for the additional feedback.

@RXPBTW.. you will be pleased to know that the Garmin GTN Trainer (6.62) on my system also fails the Direct-To, Cancel, Long Home push test... so it is not the RXP gauge, and you do not need to investigate further :happy: 

Edited by Bert Pieke

Bert

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...