Page 1 of 14

A32NX FlyByWire Overhead

Posted: Sun Aug 29, 2021 6:01 pm
by Scarabee78
Hello friends,
I am looking for testers for a overhead project for the A32NX mod from FlyByWire on MFS2020. Everything is not yet functional, but let's grow the project together. Thank you for your comments.
https://flightsim.to/file/27278/a32nx-o ... innovation
In picture an organization proposal.
preview.png

Re: A32NX FlyByWire Overhead

Posted: Sun Aug 29, 2021 6:53 pm
by Ralph
Why does it require Mobiflight?

Re: A32NX FlyByWire Overhead

Posted: Sun Aug 29, 2021 7:14 pm
by Scarabee78
I was thinking of using Mobyflight for some events and for the L: variables. I didn't know this was incompatible with the publication of the instruments. I modify them as I go.

Re: A32NX FlyByWire Overhead

Posted: Sun Aug 29, 2021 7:55 pm
by Ralph
I'm just curious why you would use Lvar's with Mobiflight and not directly through Air Manager.

Re: A32NX FlyByWire Overhead

Posted: Sun Aug 29, 2021 7:55 pm
by Ralph
I'm just curious why you would use Lvar's with Mobiflight and not directly through Air Manager :)

Re: A32NX FlyByWire Overhead

Posted: Sun Aug 29, 2021 8:18 pm
by Scarabee78
I thought it didn't work with basic AM. And then Mobyflight made it easier for me to get the list of variables.

Re: A32NX FlyByWire Overhead

Posted: Mon Aug 30, 2021 6:45 am
by Ralph
Everything Lvar and related that Mobiflight can do, Air Manager should be able to as well.
Just make sure that you are running the latest plugin.

Re: A32NX FlyByWire Overhead

Posted: Tue Aug 31, 2021 12:20 am
by JackZ
Hi.

I tested the fire panel.
I guess it is yet incomplete, here's what I found so far:
- the Fire push Button are INOP at the moment. FYI it is a two step process; first the red guard is lifted, then the button is pressed. When pressed, the SQUIBs are illuminated for AGENT 1 & 2
- the test button disappears when pressed (it lacks the pressed state png resource)
- The DISCH is normally AMBER (not RED)
- When the TEST button is pressed, all the lights of the corresponding engine/APU are lighted, including the FIRE pushbutton, along with the FIRE bell and the FIRE pushbutton below the engine start lever.

This is even trickier, ie the number of bulbs lighted in the FIRE pushbutton depends whether you are testing on batteries only (only 4 bulbs out of 8) or with APU or EXT power(8 bulbs).

Here’s an example.
Beau boulot!

Jacques
40285482-FA3A-4C87-A583-E90BDDF38BF2.jpeg

Re: A32NX FlyByWire Overhead

Posted: Tue Aug 31, 2021 1:26 am
by JackZ
Here's some suggested modifications to your code to improve the animations.

The Agent buttons should be called as button and not switches in order to be animated properly and the order of the images reversed, with a slightly smaller footprint than the hole itself.
Same applies to the test button, I recreated a "hole" by adding larger black circles in canvas beneath the buttons and shrinking a bit the test buttons.

Lastly, I suggest to use the images below for the pushed button resource (ideally the text itself should be shifted by a few pixels to the right and down) as direct replacement for "DISCH_in.png" and "DISCH_on.png" so the depth effect is reinforced. Note that "DISCH" should be in the Futura medium condensed font as per EATON/Airbus specifications (comme on dit, " qui peut le plus peut le moins" :D ):
(search for : futura_medium_condensed_bt.ttf and place the font in the resource folder, then modify the code accordingly if you wish)
DISCH_in.png
DISCH_in.png (22.04 KiB) Viewed 10118 times
DISCH_on.png
DISCH_on.png (69 KiB) Viewed 10111 times
Still a WIP, the 3 graphic resources for the FIRE pushbuttons animation are still missing, namely:
1- a lighted FIRE button, a lighted FIRE button released (ideally x2: one with 4 bulbs, and the other with 8 bulbs lighted, but I am not sure this feature has been implemented in the FBW mod)
2- a red switch guard in the open position

Tell me what you think, le Diable est dans les détails.

Jacques

Code: Select all

--====================================================================================
-- Airbus A32NX FlyByWire for Air Manager
-- Author:   Thierry Huguet (Scarabee78 on Siminnovation forum)
-- Date: Aout 2021
-- Last tested:  Built 2021-08-11T07:29:20+00:00
-- modified version by Jacques Zahar
--====================================================================================
--- Images ---
ImgBackground = img_add_fullscreen("OH-Fire.png")
Fire_ENG1 = img_add("Grille3.png",172,67,215,150)
Fire_ENG2 = img_add("Grille3.png",913,67,215,150)
Fire_APU = img_add("Grille3.png",541,37,215,150)

--- Variables importées ---
local lvar_acbus =                {"L:A32NX_ELEC_AC_ESS_BUS_IS_POWERED","num"}
local lvar_eng1agent1 =           {"L:A32NX_FIRE_ENG1_AGENT1_Discharge","num"}
local lvar_eng1agent2 =           {"L:A32NX_FIRE_ENG1_AGENT2_Discharge","num"}
local lvar_apuagent1 =            {"L:A32NX_FIRE_APU_AGENT1_Discharge","num"}
local lvar_eng2agent1 =           {"L:A32NX_FIRE_ENG2_AGENT1_Discharge","num"}
local lvar_eng2agent2 =           {"L:A32NX_FIRE_ENG2_AGENT2_Discharge","num"}
local lvar_SWannlt =              {"L:A32NX_OVHD_INTLT_ANN","num"}

--- Events actionnés ---
local event_eng1test =            {"L:A32NX_FIRE_TEST_ENG1","num"}
local event_eng2test =            {"L:A32NX_FIRE_TEST_ENG2","num"}
local event_aputest =             {"L:A32NX_FIRE_TEST_APU","num"}

--- Fonctions ---
function Lire_boutons(acbus,eng1agent1,eng2agent2,SWannlt)
	visible(eng1agent1_light_on,acbus==1 and SWannlt==0)
	visible(eng1agent2_light_on,acbus==1 and SWannlt==0)
	visible(eng1agent1_SQUIB,acbus==1 and SWannlt==0)
	visible(eng1agent2_SQUIB,acbus==1 and SWannlt==0)
	visible(eng2agent1_light_on,acbus==1 and SWannlt==0)
	visible(eng2agent2_light_on,acbus==1 and SWannlt==0)
	visible(eng2agent1_SQUIB,acbus==1 and SWannlt==0)
	visible(eng2agent2_SQUIB,acbus==1 and SWannlt==0)
	visible(apuagent_light_on,acbus==1 and SWannlt==0)
	visible(apuagent_SQUIB,acbus==1 and SWannlt==0)
end

function push_eng1test() 
	fs2020_variable_write(event_eng1test[1],event_eng1test[2],1) 
	visible(eng1agent1_light_on,1)
	visible(eng1agent2_light_on,1)
	visible(eng1agent1_SQUIB,1)
	visible(eng1agent2_SQUIB,1)
end

function release_eng1test() 
	fs2020_variable_write(event_eng1test[1],event_eng1test[2],0) 
	visible(eng1agent1_light_on,0)
	visible(eng1agent2_light_on,0)
	visible(eng1agent1_SQUIB,0)
	visible(eng1agent2_SQUIB,0)
end

function push_eng2test() 
	fs2020_variable_write(event_eng2test[1],event_eng2test[2],1)
	visible(eng2agent1_light_on,1)
	visible(eng2agent2_light_on,1)
	visible(eng2agent1_SQUIB,1)
	visible(eng2agent2_SQUIB,1) 
end

function release_eng2test() 
	fs2020_variable_write(event_eng2test[1],event_eng2test[2],0)
	visible(eng2agent1_light_on,0)
	visible(eng2agent2_light_on,0)
	visible(eng2agent1_SQUIB,0)
	visible(eng2agent2_SQUIB,0) 
end

function push_aputest() 
	fs2020_variable_write(event_aputest[1],event_aputest[2],1)
	visible(apuagent_light_on,1)
	visible(apuagent_SQUIB,1) 
end

function release_aputest() 
	fs2020_variable_write(event_aputest[1],event_aputest[2],0) 
	visible(apuagent_light_on,0)
	visible(apuagent_SQUIB,0)
end

-------------------------------------
function Eng1_agent1_pressed()

-- insert command here
end

function Eng1_agent1_released()

-- insert command here
end

function Eng1_agent2_pressed()

-- insert command here
end

function Eng1_agent2_released()

-- insert command here
end

function Eng2_agent1_pressed()

-- insert command here
end

function Eng2_agent1_released()

-- insert command here
end

function Eng2_agent2_pressed()

-- insert command here
end

function Eng2_agent2_released()

-- insert command here
end

function APU_agent_pressed()

-- insert command here
end

function APU_agent2_released()

-- insert command here
end

--- Boutons ---
push_eng1_agent1 = button_add("DISCH_out.png","DISCH_in.png",78,50,56,56, Eng1_agent1_pressed, Eng1_agent1_released)
push_eng1_agent2 = button_add("DISCH_out.png","DISCH_in.png",432,50,56,56,Eng1_agent2_pressed, Eng1_agent2_released)

push_eng2_agent1 = button_add("DISCH_out.png","DISCH_in.png",803,50,56,56,Eng2_agent1_pressed, Eng2_agent1_released)
push_eng2_agent2 = button_add("DISCH_out.png","DISCH_in.png",1160,50,56,56,Eng2_agent2_pressed, Eng2_agent2_released)

push_apu_agent =   button_add("DISCH_out.png","DISCH_in.png",527,156,56,56,APU_agent_pressed, APU_agent_released)


-- Trous sous les boutons test
canvas_add(0,0,1300,219,function()
    _circle(104,150,18)
    _circle(737,185,18)
    _circle(1200,150,18)
    _fill("black")
    end)
    
push_eng1_test =   button_add("test.png",nil,90,136,30,30,push_eng1test,release_eng1test)
push_apu_test =    button_add("test.png",nil,724,171,30,30,push_aputest,release_aputest)
push_eng2_test =   button_add("test.png",nil,1187,136,30,30,push_eng2test,release_eng2test)

--- Lumieres ---
eng1agent1_light_on = img_add("DISCH_on.png",80,50,56,56)
visible(eng1agent1_light_on,false)
eng1agent2_light_on = img_add("DISCH_on.png",432,50,56,56)
visible(eng1agent2_light_on,false)
eng1agent1_SQUIB = txt_add("SQUIB", "font:arimo_bold.ttf; size:16; color: #f9f6e6; halign:center;", 66,58, 80,30)
visible(eng1agent1_SQUIB,false)
eng1agent2_SQUIB = txt_add("SQUIB", "font:arimo_bold.ttf; size:16; color: #f9f6e6; halign:center;", 420,58, 80,30)
visible(eng1agent2_SQUIB,false)
eng2agent1_light_on = img_add("DISCH_on.png",803,50,56,56)
visible(eng2agent1_light_on,false)
eng2agent2_light_on = img_add("DISCH_on.png",1160,50,56,56)
visible(eng2agent2_light_on,false)
eng2agent1_SQUIB = txt_add("SQUIB", "font:arimo_bold.ttf; size:16;  color: #f9f6e6; halign:center;", 792,58, 80,30)
visible(eng2agent1_SQUIB,false)
eng2agent2_SQUIB = txt_add("SQUIB", "font:arimo_bold.ttf; size:16; color: #f9f6e6; halign:center;", 1149,58, 80,30)
visible(eng2agent2_SQUIB,false)
apuagent_light_on = img_add("DISCH_on.png",527,156,56,56)
visible(apuagent_light_on,false)
apuagent_SQUIB = txt_add("SQUIB", "font:futura_medium_condensed_bt.ttf; size:22; color: #f9f6e6; halign:center;", 516,164, 80,30)-- font & size modified fort testing purpose
visible(apuagent_SQUIB,false)

 -- Force a callback. The 'Lire_boutons' function will be called here with its current arguments.
request_callback(Lire_boutons)

--- Mise à jour variables ---
fs2020_variable_subscribe(lvar_acbus[1],lvar_acbus[2],                          
                          lvar_eng1agent1[1], lvar_eng1agent1[2],
                          lvar_eng1agent2[1], lvar_eng1agent2[2],
                          lvar_SWannlt[1], lvar_SWannlt[2], Lire_boutons)

Re: A32NX FlyByWire Overhead

Posted: Tue Aug 31, 2021 6:04 am
by Scarabee78
Wow, that's what I call a full review ! I'm working on it today. Thank you very much JackZ