Jump to content
Sign in to follow this  
NicolasTAP

Module for A32NX

Recommended Posts

There is no point issuing a aircraft specific module yet as there are still no Lvars available to develop functions. Only default functions can be used.


Andrew Gransden

Scotland, UK

LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer

i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew

Share this post


Link to post
Share on other sites

Thanks for your contribution Joe.

I am finally able to control the range and mode with my MCP. 👍

 

I have a few LVARS to share to anyone that I found using AAO.

I find these valuable because the mouse click area is so small (A32NX FBW developer version).

L:A32NX_SWITCH_TCAS_Position=SET (sets the TCAS knob from off to TA/RA)

L:PUSH_AUTOPILOT_CHRONO_L=SET (the push button on the glare shield area to start the timer)

L:PUSH_OVHD_CALLS_ALL=SET (button to clear the cabin ready warning)

 

  • Like 1

Share this post


Link to post
Share on other sites

Hi Joe

I have been working on some functions. I had some problems and I think I found the answer. ipc.readLvar was not working sometimes  when "L:" was included the with variable. I have changed the Battery functions A32NX_OVHD_ELEC_BAT_1_PB_IS_AUTO not A32NX_OVHD_ELEC_BAT_10_PB_IS_AUTO and they now work. Also I have added APU start/stop using Lvars. I am working on increase /decrease display brightness but not having much luck. Uses control 67227 with parameters 84 .. 94 can be seen the the console, each parameter is a different display but there is no way to apply a direction?

Frank.


function A32nx_Bat1_SET(bat1Status)       
     ipc.writeLvar("A32NX_OVHD_ELEC_BAT_1_PB_IS_AUTO", bat1Status)
end

function A32nx_Bat1_ON()
     DspShow ("Bat1", "On")
     bat1Status = 1
    A32nx_Bat1_SET(bat1Status) 
end

function A32nx_Bat1_OFF()
    DspShow ("Bat1", "Off")
     bat1Status = 0
    A32nx_Bat1_SET(bat1Status) 
end

function A32nx_Bat1_TOGGLE()
     bat1Status = ipc.readLvar("A32NX_OVHD_ELEC_BAT_1_PB_IS_AUTO")
     if bat1Status >= 1 then bat1Status = 0 else bat1Status = 1 end
    A32nx_Bat1_SET(bat1Status) 
end


function A32nx_Bat2_SET(bat2Status)
    ipc.writeLvar("L:A32NX_OVHD_ELEC_BAT_2_PB_IS_AUTO", bat2Status)
end

function A32nx_Bat2_ON()
     bat2Status = 1
    A32nx_Bat2_SET(bat2Status) 
end

function A32nx_Bat2_OFF()
     bat2Status = 0
    A32nx_Bat2_SET(bat2Status) 
end

function A32nx_Bat2_TOGGLE()
     bat2Status = ipc.readLvar("A32NX_OVHD_ELEC_BAT_2_PB_IS_AUTO")
     if bat2Status >= 1 then bat2Status = 0 else bat2Status = 1 end
    A32nx_Bat2_SET(bat2Status) 
end

function A32nx_OHD_BTN_APU_ON()
     ipc.writeLvar("A32NX_OVHD_APU_MASTER_SW_PB_IS_ON", 1)
end

function A32nx_OHD_BTN_APU_OFF()
     ipc.writeLvar("A32NX_OVHD_APU_MASTER_SW_PB_IS_ON", 0)
end

function A32nx_OHD_BTN_APU_START()
     ipc.writeLvar("A32NX_OVHD_APU_START_PB_IS_ON", 1)
end

function A32nx_OHD_BTN_ENG1_ANTI_ICE_ON()
     ipc.writeLvar("XMLVAR_Momentary_PUSH_OVHD_ANTIICE_ENG1_Pressed", 1)
end

function A32nx_OHD_BTN_ENG1_ANTI_ICE_OFF()
     ipc.writeLvar("XMLVAR_Momentary_PUSH_OVHD_ANTIICE_ENG1_Pressed", 0)
end

function A32nx_OHD_BTN_ENG2_ANTI_ICE_ON()

     ipc.writeLvar("XMLVAR_Momentary_PUSH_OVHD_ANTIICE_ENG2_Pressed", 1)
end

function A32nx_OHD_BTN_ENG2_ANTI_ICE_OFF()
     ipc.writeLvar("XMLVAR_Momentary_PUSH_OVHD_ANTIICE_ENG2_Pressed", 0)
end

function A32nx_OHD_BTN_WING_ANTI_ICE_ON()

     ipc.writeLvar("XMLVAR_Momentary_PUSH_OVHD_ANTIICE_WING_Pressed", 1)
end

function A32nx_OHD_BTN_WING_ANTI_ICE_OFF()
     ipc.writeLvar("XMLVAR_Momentary_PUSH_OVHD_ANTIICE_WING_Pressed", 0)
end


function A32nx_OHD_ALL_ANTI_ICE_OFF()
    A32nx_OHD_BTN_ENG1_ANTI_ICE_OFF()
        ipc.sleep(10)
    A32nx_OHD_BTN_ENG2_ANTI_ICE_OFF()
        ipc.sleep(100)
    A32nx_OHD_BTN_WING_ANTI_ICE_OFF()
end

function A32nx_OHD_ALL_ANTI_ICE_ON()
    A32nx_OHD_BTN_ENG1_ANTI_ICE_ON()
    ipc.sleep(100)
    A32nx_OHD_BTN_ENG2_ANTI_ICE_ON()
    ipc.sleep(100)
    A32nx_OHD_BTN_WING_ANTI_ICE_ON()
end

function DCDU_L_Brightness10 ()
    ipc.writeLvar("A32NX_PANEL_DCDU_L_BRIGHTNESS",  10)
end

function DCDU_L_Brightness5 ()
    ipc.writeLvar("A32NX_PANEL_DCDU_L_BRIGHTNESS",  0.5)
end


function MCDU_L_Brightness1 () -- default= 0.4 to 1 
    ipc.writeLvar("A32NX_MCDU_L_BRIGHTNESS",  1)
end

function MCDU_L_Brightness5 ()
    ipc.writeLvar("A32NX_MCDU_L_BRIGHTNESS",  0.4)
end
 

Share this post


Link to post
Share on other sites
On 5/19/2021 at 9:03 PM, Carliolian said:

Hi Joe

I have been working on some functions. I had some problems and I think I found the answer. ipc.readLvar was not working sometimes  when "L:" was included the with variable. I have changed the Battery functions A32NX_OVHD_ELEC_BAT_1_PB_IS_AUTO not A32NX_OVHD_ELEC_BAT_10_PB_IS_AUTO and they now work. Also I have added APU start/stop using Lvars. I am working on increase /decrease display brightness but not having much luck. Uses control 67227 with parameters 84 .. 94 can be seen the the console, each parameter is a different display but there is no way to apply a direction?

Frank.


function A32nx_Bat1_SET(bat1Status)       
     ipc.writeLvar("A32NX_OVHD_ELEC_BAT_1_PB_IS_AUTO", bat1Status)
end

function A32nx_Bat1_ON()
     DspShow ("Bat1", "On")
     bat1Status = 1
    A32nx_Bat1_SET(bat1Status) 
end

function A32nx_Bat1_OFF()
    DspShow ("Bat1", "Off")
     bat1Status = 0
    A32nx_Bat1_SET(bat1Status) 
end

function A32nx_Bat1_TOGGLE()
     bat1Status = ipc.readLvar("A32NX_OVHD_ELEC_BAT_1_PB_IS_AUTO")
     if bat1Status >= 1 then bat1Status = 0 else bat1Status = 1 end
    A32nx_Bat1_SET(bat1Status) 
end


function A32nx_Bat2_SET(bat2Status)
    ipc.writeLvar("L:A32NX_OVHD_ELEC_BAT_2_PB_IS_AUTO", bat2Status)
end

function A32nx_Bat2_ON()
     bat2Status = 1
    A32nx_Bat2_SET(bat2Status) 
end

function A32nx_Bat2_OFF()
     bat2Status = 0
    A32nx_Bat2_SET(bat2Status) 
end

function A32nx_Bat2_TOGGLE()
     bat2Status = ipc.readLvar("A32NX_OVHD_ELEC_BAT_2_PB_IS_AUTO")
     if bat2Status >= 1 then bat2Status = 0 else bat2Status = 1 end
    A32nx_Bat2_SET(bat2Status) 
end

 

Hi,

Sorry Idk if I am doing something wrong but when I try to use the battery related command they don't work for me. Can you please guide me about what I may be doing wrong as in FSUIPC log it says attempt to compare number with nil. All help is appreciated thank you.

Regards

Share this post


Link to post
Share on other sites

@Carliolian Hi, I do have the WASM module installed, I am using the latest FSUIPC version. I have tried all the battery related command such as toggle/set/on/off, I am unable to get any of them to work. Maybe I am doing something wrong in Linda. What commands are you using for the battery switches to work, thanks your help is appreciated.

Regards

Waqar

Share this post


Link to post
Share on other sites

A32NX_OVHD_ELEC_BAT_2_PB_IS_AUTO is for the FBW A320 neo It can be watched in 

Developermode -> Windows -> model behavour debug -> LoCAL VARIABLES.

If you are not using FBW A320 then it will not be there. SO the "if" statements will return a nil.

Frank

Share this post


Link to post
Share on other sites
1 hour ago, Carliolian said:

A32NX_OVHD_ELEC_BAT_2_PB_IS_AUTO is for the FBW A320 neo It can be watched in 

Developermode -> Windows -> model behavour debug -> LoCAL VARIABLES.

If you are not using FBW A320 then it will not be there. SO the "if" statements will return a nil.

Frank

Hi, 

I have tested and watched the local variable in the developer mode and for me its A32NX_OVHD_ELEC_BAT_10_PB_IS_AUTO and A32NX_OVHD_ELEC_BAT_11_PB_IS_AUTO when I press the battery buttons in the cockpit even when using the FBW A320 mod. I am using the build 0.6.1 stable version. I have managed to get the batteries working directly using FSUIPC but not using Linda which is a pain tbh. If you have suggestions it will be helpful thanks.

Regards

Waqar

Share this post


Link to post
Share on other sites

well I guess I will be reviving this thread a bit as I search for all those fuel pumps and everything on the overhead panel that you have to do to startup the A/C

 

I found one command that does 5/6 fuel but not the right most one.

Share this post


Link to post
Share on other sites
13 hours ago, john44111 said:

well I guess I will be reviving this thread a bit as I search for all those fuel pumps and everything on the overhead panel that you have to do to startup the A/C

I found one command that does 5/6 fuel but not the right most one.

There is an issue with the fuel pumps switches. If all fuel pumps are switched off the engines will shutdown as the FBW A32NX does not assume gravity feed to the engines. Therefore, the ALL pumps OFF functions leaves the right most fuel pump on to prevent possible flame out.


Andrew Gransden

Scotland, UK

LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer

i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew

Share this post


Link to post
Share on other sites

yeah I just caught that and tried to edit that out in the actions.lua file but that hasnt seem to have taken. I have a toggle switch that id like to operate all those pumps. If I switch it off that is on me 🙂 pressing the toggle and having one pump not change is making my OCD flare up.

 

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...