WIP: an MCDU for FFA320

Working on a instrument project or just finished a project? Show it to others!

Moderators: russ, Ralph

Post Reply
Message
Author
JackZ
Posts: 2262
Joined: Mon Feb 22, 2016 1:02 pm

WIP: an MCDU for FFA320

#1 Post by JackZ »

While trying to get my hardware MCDU from Open cockpit to work with XPlane and namely FFA320, I figured that OCUSBmapper which had a client display was not working with the Airbus FMS display, because the size and color of each character can be variable, to the contrary of the AIrbus one.

SO I bit the bullet and developped an A320 MCDU emulator.
The result is very pleasing.
Capture.PNG
My only problem left is that I am not able to display the amber boxes in the INIT page, as the boxed character is not available in the current consolata font.

Next step, the keyboard, quite a job in perspective.

Jacques
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

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

Re: WIP: an MCDU for FFA320

#2 Post by JackZ »

My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

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

Re: WIP: an MCDU for FFA320

#3 Post by Ralph »

Nice work! What we did with the G5 was to create our own font from an existing font. In our case we added 'symbols' to existing characters that weren't used. I don't know exactly anymore, but for example â would become KT in a vertical order. I suppose you can do the same thing for the boxes.

https://fontforge.org/en-US/

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

Re: WIP: an MCDU for FFA320

#4 Post by JackZ »

Good catch Ralph, I am planning definitely to do that.
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

User avatar
WillemijnL
Posts: 107
Joined: Sat Jan 30, 2016 1:14 pm

Re: WIP: an MCDU for FFA320

#5 Post by WillemijnL »

Can this help you? Tonight I have modified a copy of a library class I made that did almost the job. I'm working on a toolbox with handy tools, such as string functions but also for creating feature rich and complex buttons for use in modern glass cockpit (touch) displays. One of them is a class to create text buttons without images but with pressed and active state. Tonight a new addition that I will publish already here.

The new class is called SbxAmMcduText. Tab characters ("\t") are converted to box characters, so only regular ASCII characters are needed. You can use monospaced fonts but proportional fonts too, everything is displayed monospaced. Sizes of the boxes (charHeight, charWidth) and font (optional: fontSize) can be set to correspond with each other.

Example:

Code: Select all

text_box1 = SbxAmMcduText.new(20, 35, "\t\t\t\t/\t\t\t\t", "#CAB84F", "black", "inconsolata_bold.ttf", 28, 24, 9, 2, 0, 38)
....
text_box1:setColor("white")
text_box1:setText("EHAM/EDDM")
....
text_box1:setColor("#CAB84F")  -- amber
text_box1:setText("\t\t\t\t/\t\t\t\t")
SbxMcduText_example2.png
Also an example with a gray background to show the boundaries of the text boxes.
SbxMcduText_example1.png
You can give it a try with this demo instrument.
Demo - MCDU Text Demo.siff
(18.41 KiB) Downloaded 200 times
The change buttons will toggle the text. The class has still to be fine tunned. The library files are inside the lib subdirectory.
A nice one used in this demo instrument: SbxUtils.Graphics.color_add_fullscreen("black").

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

Re: WIP: an MCDU for FFA320

#6 Post by JackZ »

Thank you Willeminj I’ll have a look at it.

I finally modified an existing font, adding the missing characters such as the triangle (overfly), and empty boxes, correcting some characters (+,-, 4, etc...)
1008A2D2-C10B-48F9-9CE5-C318543F560A.jpeg
Getting closer to the original
FDEABB87-AAE6-42CB-8733-DD04E31CF5F6.jpeg
By the way, I found a way to display a Unicode character in Lua (for example to display symbols such as arrows or the empty boxes).
Simply use the string

Code: Select all

char=“\u{XXXX}”
Where XXXX is the Unicode hex number of the character,

Jacques
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

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

Re: WIP: an MCDU for FFA320

#7 Post by JackZ »

Hardware interface and display script entirely done with Air Manager and OCUSBMapper. No SIOC nor XLua where harmed nor used in the process :lol:
CFCE4EB2-DE12-4EAE-A523-B4D341F1751D.jpeg
Jacques
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

User avatar
WillemijnL
Posts: 107
Joined: Sat Jan 30, 2016 1:14 pm

Re: WIP: an MCDU for FFA320

#8 Post by WillemijnL »

Looks very good. Great job!

Post Reply