Bezel for GTN 650

Peer support for Air Manager desktop users

Moderators: russ, Ralph

Post Reply
Message
Author
AnthonySullivan
Posts: 91
Joined: Wed Jul 01, 2020 8:06 am

Bezel for GTN 650

#1 Post by AnthonySullivan »

Apologies if I am going over old ground, but I have searched the forum with no luck.
I am enjoying the bezel provided by Sim Innovations for the Real XP GTN 750 and I need one for the GTN 650.
No problem I think; just clone the 750, make a new picture in Skinman and modify the Lua accordingly.
Problem is the Lua code provided for the 750 is beyond my understanding so I try to write my own code (having checked the commands in dataref Search) but it does not work. Nothing happens.
I see in the 750 that we need to identify a device ID but I don't know how to do that. I am not sure if that is my problem.
Would some kind soul mind giving us beginners some guidance on how to set up code for the 650 bezel??
Many thanks as always.
Anthony Sullivan

JackZ
Posts: 2267
Joined: Mon Feb 22, 2016 1:02 pm

Re: Bezel for GTN 650

#2 Post by JackZ »

The GTN 650 bezel is simply a reduced size of the GTN 750 bezel.
The buttons and functions are exactly the same, with a different position for the DIR TO and Dial.*

So instead of reinventing the wheel, this is a three step procedure.
1-Create a clone of the GTN 750 instrument and rename it GTN 650
2- Either create or modify the GTN 750 bezel to the proper size (can be done in SkinMan), then use this background instead
image.png
3- Modify the x,y position of the Direct To button and the Inner/outer dial

The last part is a bit tricky as it requires a bit of trial and error. What I tend to use is this:
I add temporarily in the code a red rectangle in canvas with the location & size of the button/dial. This in order to visualize the touch zone and adjust it accordingly.

example:

Code: Select all

-- canvas_add(0,0,826,348,function()
--     _rect(760, 114, 52, 38)
--     _stroke("red",1)
--     end) 

button_add(nil, nil, 760, 114, 52, 38, function()
    xpl_command("RXP/GTN/DTO_" .. tostring(device_id) )
    fsx_event("GPS_DIRECTTO_BUTTON")
end)
Once done, that's it....

Jacques
@Ralph I noticed that you used a clever trick to modify at runtime the bounding boxes of the Dial depending on if the Knobster is used or not.
Here

Code: Select all

outer_pos = fif(user_prop_get(input_prop) == "Mouse / touch", {727, 238, 120, 140}, {746, 257, 80, 80} )
inner_pos = fif(user_prop_get(input_prop) == "Mouse / touch", {752, 263, 70, 70}, {757, 268, 58, 58} )
Is there a logic in the increase of size/position? BTW the size affectation seems backward, ie when Knobster is selected, the bounding boxes are smaller.
image.png
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

AnthonySullivan
Posts: 91
Joined: Wed Jul 01, 2020 8:06 am

Re: Bezel for GTN 650

#3 Post by AnthonySullivan »

Thanks Jack, that will be a great help. Maybe Sim Innovations could provide it for everyone?

One secondary thought. Could programmers take account of struggling beginners when writing their code. I know it is good to display your skills and have the most efficient code with minimum number of lines.

But perhaps they could consider adding lots of comments and remarks to explain what they are doing and how it works.

Perhaps they could consider drafting Lua in a rather simplistic format (e.g. no functions within functions?). The code may not be ultra efficient but beginners would have a chance to understand and learn from it.

The objective must be to encourage more people to write their own code.

best wishes
Anthony

User avatar
Ralph
Posts: 7931
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Bezel for GTN 650

#4 Post by Ralph »

It was still on my to-do list, but there's a bit too much on it for now. First version 4.1 :) and administration :cry:

Post Reply