Airmanager via pico-projectors

Upload and share cool photos and videos of Air Manager in action

Moderators: Ralph, russ

Message
Author
vangyver
Posts: 111
Joined: Sat Dec 05, 2015 8:30 am

Re: Airmanager via pico-projectors

#11 Post by vangyver »

The STEC was made by Tony Shade for the A2A Piper Comanche. I also cannot find it in the downloads anymore. I will send the one I have to you. Just tell me how to send it.

Delay in Radios on switch:
https://www.youtube.com/watch?v=X41CPszF8Ko

vangyver
Posts: 111
Joined: Sat Dec 05, 2015 8:30 am

Re: Airmanager via pico-projectors

#12 Post by vangyver »

Maybe Sim Innovations removed it ?
Vangyver

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

Re: Airmanager via pico-projectors

#13 Post by JackZ »

@vangyver You can always PM me
vangyver wrote: Fri Jun 17, 2022 1:25 pm Delay in Radios on switch:
https://www.youtube.com/watch?v=X41CPszF8Ko
Okay that should be fun to implement. Which AM radios are you using?

Working on the DAVTRON M930ID right now. So far so good, had the NAV ID routine working, the Localizer display is tricky, but I will succeed eventually I hope..
image.png
image.png (40.33 KiB) Viewed 557 times
image.png
image.png (40.54 KiB) Viewed 557 times
image.png
image.png (37.68 KiB) Viewed 557 times
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

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

Re: Airmanager via pico-projectors

#14 Post by JackZ »

And for the radio startup sequence, it is done.
Replace the code of the Generic Bendix/king KX56A TSO by this one (Make a clone first!)
For the COM1/NAV1

Code: Select all

-- User properties
-- prop_com = user_prop_add_enum("Radio source", "COM1/NAV1,COM2/NAV2", "COM1/NAV1", "Choose between COM1/NAV1 and COM2/NAV2")
-- Temporarily disabled until user properties become available on the tablet versions of Air Manager.
local prop_com = "COM1/NAV1"
-- Global variables
local gbl_power = false
local gbl_channel = 0
-- local persist_channel_chg = persist_add("channel", "INT", 0)
-- if user_prop_get(prop_com) == "COM1/NAV1" then
    -- gbl_channel = var_cap(0 + persist_get(persist_channel_chg), 0, 1)
-- else
    -- gbl_channel = var_cap(1 + persist_get(persist_channel_chg), 0, 1)
-- end

-- Button functions --
-- function channel_chg_callback()
    -- if persist_get(persist_channel_chg) == 0 then
        -- persist_put(persist_channel_chg, 1)
    -- else
        -- persist_put(persist_channel_chg, 0)
    -- end

    -- gbl_channel = persist_get(persist_channel_chg)
    -- if xpl_connected() then request_callback(new_navcomm) end
    -- if fsx_connected() or p3d_connected() then request_callback(new_navcomm_FSX) end
    
    -- txt_set(txt_channel, string.format("COM%.0f", gbl_channel+1) )
    -- visible(txt_channel, true)
    -- timer_stop(timer_channel)
    -- timer_channel = timer_start(2000,nil, function()
        -- visible(txt_channel, false)
    -- end)
-- end

function new_onoff(state, direction)

    if gbl_channel == 0 then
        xpl_dataref_write("sim/cockpit2/radios/actuators/com1_power", "INT", state + direction)
    else
        xpl_dataref_write("sim/cockpit2/radios/actuators/com2_power", "INT", state + direction)
    end
    
end

function new_comtransfer()

    if gbl_channel == 0 then
        xpl_command("sim/radios/com1_standy_flip")
        fsx_event("COM_STBY_RADIO_SWAP")
        fs2020_event("COM_STBY_RADIO_SWAP")
    else
        xpl_command("sim/radios/com2_standy_flip")
        fsx_event("COM2_RADIO_SWAP")
        fs2020_event("COM2_RADIO_SWAP")
    end

end

function new_navtransfer()

    if gbl_channel == 0 then
        xpl_command("sim/radios/nav1_standy_flip")
        fsx_event("NAV1_RADIO_SWAP")
        fs2020_event("NAV1_RADIO_SWAP")
    else
        xpl_command("sim/radios/nav2_standy_flip")
        fsx_event("NAV2_RADIO_SWAP")
        fs2020_event("NAV2_RADIO_SWAP")
    end

end

function new_combig(combigvar)

    if gbl_channel == 0 then
        if combigvar == 1 then
            xpl_command("sim/radios/stby_com1_coarse_up")
            fsx_event("COM_RADIO_WHOLE_INC")
            fs2020_event("COM_RADIO_WHOLE_INC")
        elseif combigvar == -1 then
            xpl_command("sim/radios/stby_com1_coarse_down")
            fsx_event("COM_RADIO_WHOLE_DEC")
            fs2020_event("COM_RADIO_WHOLE_DEC")
        end
    else
        if combigvar == 1 then
            xpl_command("sim/radios/stby_com2_coarse_up")
            fsx_event("COM2_RADIO_WHOLE_INC")
            fs2020_event("COM2_RADIO_WHOLE_INC")
        elseif combigvar == -1 then
            xpl_command("sim/radios/stby_com2_coarse_down")
            fsx_event("COM2_RADIO_WHOLE_DEC")
            fs2020_event("COM2_RADIO_WHOLE_DEC")
        end
    end

end

function new_comsmall(comsmallvar)

    if gbl_channel == 0 then
        if comsmallvar == 1 then
            xpl_command("sim/radios/stby_com1_fine_up_833")
            fsx_event("COM_RADIO_FRACT_INC")
            fs2020_event("COM_RADIO_FRACT_INC")
        elseif comsmallvar == -1 then
            xpl_command("sim/radios/stby_com1_fine_down_833")
            fsx_event("COM_RADIO_FRACT_DEC")
            fs2020_event("COM_RADIO_FRACT_DEC")
        end
    else
        if comsmallvar == 1 then
            xpl_command("sim/radios/stby_com2_fine_up_833")
            fsx_event("COM2_RADIO_FRACT_INC")
            fs2020_event("COM2_RADIO_FRACT_INC")
        elseif comsmallvar == -1 then
            xpl_command("sim/radios/stby_com2_fine_down_833")
            fsx_event("COM2_RADIO_FRACT_DEC")
            fs2020_event("COM2_RADIO_FRACT_DEC")
        end
    end

end

function new_navbig(navbigvar)
    
    if gbl_channel == 0 then
        if navbigvar == 1 then
            xpl_command("sim/radios/stby_nav1_coarse_up")
            fsx_event("NAV1_RADIO_WHOLE_INC")
            fs2020_event("NAV1_RADIO_WHOLE_INC")
        elseif navbigvar == -1 then
            xpl_command("sim/radios/stby_nav1_coarse_down")
            fsx_event("NAV1_RADIO_WHOLE_DEC")
            fs2020_event("NAV1_RADIO_WHOLE_DEC")
        end
    else
        if navbigvar == 1 then
            xpl_command("sim/radios/stby_nav2_coarse_up")
            fsx_event("NAV2_RADIO_WHOLE_INC")
            fs2020_event("NAV2_RADIO_WHOLE_INC")
        elseif navbigvar == -1 then
            xpl_command("sim/radios/stby_nav2_coarse_down")
            fsx_event("NAV2_RADIO_WHOLE_DEC")
            fs2020_event("NAV2_RADIO_WHOLE_DEC")
        end
    end

end

function new_navsmall(navsmallvar)

    if gbl_channel == 0 then
        if navsmallvar == 1 then
            xpl_command("sim/radios/stby_nav1_fine_up")
            fsx_event("NAV1_RADIO_FRACT_INC")
            fs2020_event("NAV1_RADIO_FRACT_INC")
        elseif navsmallvar == -1 then
            xpl_command("sim/radios/stby_nav1_fine_down")
            fsx_event("NAV1_RADIO_FRACT_DEC")
            fs2020_event("NAV1_RADIO_FRACT_DEC")
        end
    else
        if navsmallvar == 1 then
            xpl_command("sim/radios/stby_nav2_fine_up")
            fsx_event("NAV2_RADIO_FRACT_INC")
            fs2020_event("NAV2_RADIO_FRACT_INC")
        elseif navsmallvar == -1 then
            xpl_command("sim/radios/stby_nav2_fine_down")
            fsx_event("NAV2_RADIO_FRACT_DEC")
            fs2020_event("NAV2_RADIO_FRACT_DEC")
        end
    end

end

-- Add images in Z-order --
img_add_fullscreen("KX165A.png")
redline = img_add("redline.png", 349, 34, 2, 60)

-- Add text --
txt_com = txt_add(" ", "size:36px; color: #fb2c00; halign: left;", 25, 48, 200, 200)
txt_comstby = txt_add(" ", "size:36px; color: #fb2c00; halign: left;", 200, 48, 200, 200)
comm_grp=group_add(txt_com,txt_comstby)

txt_nav = txt_add(" ", "size:36px; color: #fb2c00; halign: left;", 365, 48, 200, 200)
txt_navstby = txt_add(" ", "size:36px; color: #fb2c00; halign: left;", 520, 48, 200, 200)
nav_grp=group_add(txt_nav,txt_navstby)

txt_channel = txt_add("COM1", "size:20px; color: #fb2c00; halign: left;", 640, 30, 40, 30)
txt_set(txt_channel, string.format("COM%.0f", gbl_channel+1) )
visible(txt_channel, false)

-- Set default visibility --
visible(redline, false)
display_grp=group_add(comm_grp,nav_grp,txt_channel,redline)
visible(display_grp,false)
-- Functions --
function startup_callback()
    visible(redline, gbl_power)
    visible(nav_grp,gbl_power)
    timer_stop(tmr2)
    tmr2=timer_start(1500,0,function()
        visible(comm_grp,gbl_power)
        end)            
    
end

function new_navcomm(nav1, nav1stby, com1, com1stby, nav2, nav2stby, com2, com2stby, com1_power, com2_power, bus_volts, avionics)
    
    if gbl_channel == 0 then
        com     = com1
        comstby = com1stby
        nav     = nav1
        navstby = nav1stby
        com_pwr = com1_power
    else
        com     = com2
        comstby = com2stby
        nav     = nav2
        navstby = nav2stby
        com_pwr = com2_power
    end
    
    gbl_power = com_pwr == 1 and bus_volts[1] >= 10 and avionics == 1
 
       
    if avionics==1 then 
            visible(redline, gbl_power)
            visible(display_grp,false)
            timer_stop(tmr) 
            tmr=timer_start(500,0,startup_callback) 
        else
            timer_stop(tmr) 
            visible(redline, false)
            visible(display_grp,false)
        end

    if gbl_power then

        txt_set(txt_com, string.format("%07.03f",com/1000, com%1000) )
        txt_set(txt_comstby, string.format("%07.03f",comstby/1000, comstby%1000))
        txt_set(txt_nav, string.format("%06.02f",nav/100, nav%100))
        txt_set(txt_navstby, string.format("%06.02f",navstby/100, navstby%100) )
    else
        txt_set(txt_com, " ")
        txt_set(txt_comstby, " ")
        txt_set(txt_nav, " ")
        txt_set(txt_navstby, " ")
         visible(redline, gbl_power)
    end
    
    switch_set_position(switch_onoff, com_pwr)
    
end

function new_navcomm_FSX(nav1, nav1stby, com1, com1stby, nav2, nav2stby, com2, com2stby, bus_volts, avionics)

    avionics = fif(avionics, 1, 0)
    new_navcomm(nav1*100+0.01, nav1stby*100+0.01, com1*1000+0.01, com1stby*1000+0.01, nav2*100+0.01, nav2stby*100+0.01, com2*1000+0.01, com2stby*1000+0.01, 1, 1, {bus_volts}, avionics)
    
end

-- Switches, buttons and dials --
switch_onoff = switch_add("offswitch.png","onswitch.png",61,154,47,47, new_onoff)
comtransfer = button_add("switchfreq.png", "switchfreqpressed.png", 130, 135, 60, 38, new_comtransfer)
navtransfer = button_add("switchfreq.png", "switchfreqpressed.png", 487, 135, 60, 38, new_navtransfer)
-- channel_chg = button_add(nil, nil, 507, 193, 18, 18, channel_chg_callback)
combig = dial_add("dialbig.png", 209, 93, 126, 126, new_combig)
comsmall = dial_add("dialsmall.png", 243, 127, 58, 58, new_comsmall)
navbig = dial_add("dialbig.png", 574, 93, 126, 126, new_navbig)
navsmall = dial_add("dialsmall.png", 608, 127, 58, 58, new_navsmall)
img_add("navswitch.png", 414, 156, 38, 38)

-- Bus subscribe --
xpl_dataref_subscribe("sim/cockpit/radios/nav1_freq_hz", "INT", 
                      "sim/cockpit/radios/nav1_stdby_freq_hz", "INT",
                      "sim/cockpit2/radios/actuators/com1_frequency_hz_833", "INT",
                      "sim/cockpit2/radios/actuators/com1_standby_frequency_hz_833", "INT",
                      "sim/cockpit/radios/nav2_freq_hz", "INT", 
                      "sim/cockpit/radios/nav2_stdby_freq_hz", "INT",
                      "sim/cockpit2/radios/actuators/com2_frequency_hz_833", "INT",
                      "sim/cockpit2/radios/actuators/com2_standby_frequency_hz_833", "INT", 
                      "sim/cockpit2/radios/actuators/com1_power", "INT",
                      "sim/cockpit2/radios/actuators/com2_power", "INT",
                      "sim/cockpit2/electrical/bus_volts", "FLOAT[6]", 
                      "sim/cockpit/electrical/avionics_on", "INT", new_navcomm)
fsx_variable_subscribe("NAV ACTIVE FREQUENCY:1", "Mhz",
                       "NAV STANDBY FREQUENCY:1", "Mhz",
                       "COM ACTIVE FREQUENCY:1", "Mhz",
                       "COM STANDBY FREQUENCY:1", "Mhz",
                       "NAV ACTIVE FREQUENCY:2", "Mhz",
                       "NAV STANDBY FREQUENCY:2", "Mhz",
                       "COM ACTIVE FREQUENCY:2", "Mhz",
                       "COM STANDBY FREQUENCY:2", "Mhz", 
                       "ELECTRICAL AVIONICS BUS VOLTAGE", "Volts", 
                       "AVIONICS MASTER SWITCH", "Bool", new_navcomm_FSX)
fs2020_variable_subscribe("NAV ACTIVE FREQUENCY:1", "Mhz",
                          "NAV STANDBY FREQUENCY:1", "Mhz",
                          "COM ACTIVE FREQUENCY:1", "Mhz",
                          "COM STANDBY FREQUENCY:1", "Mhz",
                          "NAV ACTIVE FREQUENCY:2", "Mhz",
                          "NAV STANDBY FREQUENCY:2", "Mhz",
                          "COM ACTIVE FREQUENCY:2", "Mhz",
                          "COM STANDBY FREQUENCY:2", "Mhz", 
                          "ELECTRICAL MAIN BUS VOLTAGE", "Volts", 
                          "AVIONICS MASTER SWITCH", "Bool", new_navcomm_FSX)                                


For the COM2/NAV

Code: Select all

-- User properties
-- prop_com = user_prop_add_enum("Radio source", "COM1/NAV1,COM2/NAV2", "COM1/NAV1", "Choose between COM1/NAV1 and COM2/NAV2")
-- Temporarily disabled until user properties become available on the tablet versions of Air Manager.
local prop_com = "COM2/NAV2"
-- Global variables
local gbl_power = false
local gbl_channel = 1
-- local persist_channel_chg = persist_add("channel", "INT", 0)
-- if user_prop_get(prop_com) == "COM1/NAV1" then
    -- gbl_channel = var_cap(0 + persist_get(persist_channel_chg), 0, 1)
-- else
    -- gbl_channel = var_cap(1 + persist_get(persist_channel_chg), 0, 1)
-- end

-- Button functions --
-- function channel_chg_callback()
    -- if persist_get(persist_channel_chg) == 0 then
        -- persist_put(persist_channel_chg, 1)
    -- else
        -- persist_put(persist_channel_chg, 0)
    -- end

    -- gbl_channel = persist_get(persist_channel_chg)
    -- if xpl_connected() then request_callback(new_navcomm) end
    -- if fsx_connected() or p3d_connected() then request_callback(new_navcomm_FSX) end
    
    -- txt_set(txt_channel, string.format("COM%.0f", gbl_channel+1) )
    -- visible(txt_channel, true)
    -- timer_stop(timer_channel)
    -- timer_channel = timer_start(2000,nil, function()
        -- visible(txt_channel, false)
    -- end)
-- end

function new_onoff(state, direction)

    if gbl_channel == 0 then
        xpl_dataref_write("sim/cockpit2/radios/actuators/com1_power", "INT", state + direction)
    else
        xpl_dataref_write("sim/cockpit2/radios/actuators/com2_power", "INT", state + direction)
    end
    
end

function new_comtransfer()

    if gbl_channel == 0 then
        xpl_command("sim/radios/com1_standy_flip")
        fsx_event("COM_STBY_RADIO_SWAP")
        fs2020_event("COM_STBY_RADIO_SWAP")
    else
        xpl_command("sim/radios/com2_standy_flip")
        fsx_event("COM2_RADIO_SWAP")
        fs2020_event("COM2_RADIO_SWAP")
    end

end

function new_navtransfer()

    if gbl_channel == 0 then
        xpl_command("sim/radios/nav1_standy_flip")
        fsx_event("NAV1_RADIO_SWAP")
        fs2020_event("NAV1_RADIO_SWAP")
    else
        xpl_command("sim/radios/nav2_standy_flip")
        fsx_event("NAV2_RADIO_SWAP")
        fs2020_event("NAV2_RADIO_SWAP")
    end

end

function new_combig(combigvar)

    if gbl_channel == 0 then
        if combigvar == 1 then
            xpl_command("sim/radios/stby_com1_coarse_up")
            fsx_event("COM_RADIO_WHOLE_INC")
            fs2020_event("COM_RADIO_WHOLE_INC")
        elseif combigvar == -1 then
            xpl_command("sim/radios/stby_com1_coarse_down")
            fsx_event("COM_RADIO_WHOLE_DEC")
            fs2020_event("COM_RADIO_WHOLE_DEC")
        end
    else
        if combigvar == 1 then
            xpl_command("sim/radios/stby_com2_coarse_up")
            fsx_event("COM2_RADIO_WHOLE_INC")
            fs2020_event("COM2_RADIO_WHOLE_INC")
        elseif combigvar == -1 then
            xpl_command("sim/radios/stby_com2_coarse_down")
            fsx_event("COM2_RADIO_WHOLE_DEC")
            fs2020_event("COM2_RADIO_WHOLE_DEC")
        end
    end

end

function new_comsmall(comsmallvar)

    if gbl_channel == 0 then
        if comsmallvar == 1 then
            xpl_command("sim/radios/stby_com1_fine_up_833")
            fsx_event("COM_RADIO_FRACT_INC")
            fs2020_event("COM_RADIO_FRACT_INC")
        elseif comsmallvar == -1 then
            xpl_command("sim/radios/stby_com1_fine_down_833")
            fsx_event("COM_RADIO_FRACT_DEC")
            fs2020_event("COM_RADIO_FRACT_DEC")
        end
    else
        if comsmallvar == 1 then
            xpl_command("sim/radios/stby_com2_fine_up_833")
            fsx_event("COM2_RADIO_FRACT_INC")
            fs2020_event("COM2_RADIO_FRACT_INC")
        elseif comsmallvar == -1 then
            xpl_command("sim/radios/stby_com2_fine_down_833")
            fsx_event("COM2_RADIO_FRACT_DEC")
            fs2020_event("COM2_RADIO_FRACT_DEC")
        end
    end

end

function new_navbig(navbigvar)
    
    if gbl_channel == 0 then
        if navbigvar == 1 then
            xpl_command("sim/radios/stby_nav1_coarse_up")
            fsx_event("NAV1_RADIO_WHOLE_INC")
            fs2020_event("NAV1_RADIO_WHOLE_INC")
        elseif navbigvar == -1 then
            xpl_command("sim/radios/stby_nav1_coarse_down")
            fsx_event("NAV1_RADIO_WHOLE_DEC")
            fs2020_event("NAV1_RADIO_WHOLE_DEC")
        end
    else
        if navbigvar == 1 then
            xpl_command("sim/radios/stby_nav2_coarse_up")
            fsx_event("NAV2_RADIO_WHOLE_INC")
            fs2020_event("NAV2_RADIO_WHOLE_INC")
        elseif navbigvar == -1 then
            xpl_command("sim/radios/stby_nav2_coarse_down")
            fsx_event("NAV2_RADIO_WHOLE_DEC")
            fs2020_event("NAV2_RADIO_WHOLE_DEC")
        end
    end

end

function new_navsmall(navsmallvar)

    if gbl_channel == 0 then
        if navsmallvar == 1 then
            xpl_command("sim/radios/stby_nav1_fine_up")
            fsx_event("NAV1_RADIO_FRACT_INC")
            fs2020_event("NAV1_RADIO_FRACT_INC")
        elseif navsmallvar == -1 then
            xpl_command("sim/radios/stby_nav1_fine_down")
            fsx_event("NAV1_RADIO_FRACT_DEC")
            fs2020_event("NAV1_RADIO_FRACT_DEC")
        end
    else
        if navsmallvar == 1 then
            xpl_command("sim/radios/stby_nav2_fine_up")
            fsx_event("NAV2_RADIO_FRACT_INC")
            fs2020_event("NAV2_RADIO_FRACT_INC")
        elseif navsmallvar == -1 then
            xpl_command("sim/radios/stby_nav2_fine_down")
            fsx_event("NAV2_RADIO_FRACT_DEC")
            fs2020_event("NAV2_RADIO_FRACT_DEC")
        end
    end

end

-- Add images in Z-order --
img_add_fullscreen("KX165A.png")
redline = img_add("redline.png", 349, 34, 2, 60)

-- Add text --
txt_com = txt_add(" ", "size:36px; color: #fb2c00; halign: left;", 25, 48, 200, 200)
txt_comstby = txt_add(" ", "size:36px; color: #fb2c00; halign: left;", 200, 48, 200, 200)
comm_grp=group_add(txt_com,txt_comstby)

txt_nav = txt_add(" ", "size:36px; color: #fb2c00; halign: left;", 365, 48, 200, 200)
txt_navstby = txt_add(" ", "size:36px; color: #fb2c00; halign: left;", 520, 48, 200, 200)
nav_grp=group_add(txt_nav,txt_navstby)
txt_channel = txt_add("COM1", "size:20px; color: #fb2c00; halign: left;", 640, 30, 40, 30)
txt_set(txt_channel, string.format("COM%.0f", gbl_channel+1) )
visible(txt_channel, false)


-- Set default visibility --
visible(redline, false)
display_grp=group_add(comm_grp,nav_grp,txt_channel,redline)
visible(display_grp,false)


-- Functions --
-- Functions --
function startup_callback()
    visible(redline, gbl_power)
    visible(nav_grp,gbl_power)
    timer_stop(tmr2)
    tmr2=timer_start(1500,0,function()
        visible(comm_grp,gbl_power)
        end)            
    
end

function new_navcomm(nav1, nav1stby, com1, com1stby, nav2, nav2stby, com2, com2stby, com1_power, com2_power, bus_volts, avionics)
    
    if gbl_channel == 0 then
        com     = com1
        comstby = com1stby
        nav     = nav1
        navstby = nav1stby
        com_pwr = com1_power
    else
        com     = com2
        comstby = com2stby
        nav     = nav2
        navstby = nav2stby
        com_pwr = com2_power
    end
    
    gbl_power = com_pwr == 1 and bus_volts[1] >= 10 and avionics == 1
    
    if avionics==1 then 
            visible(redline, gbl_power)
            visible(display_grp,false)
            timer_stop(tmr) 
            tmr=timer_start(500,0,startup_callback) 
        else
            timer_stop(tmr) 
            visible(redline, false)
            visible(display_grp,false)
        end

    if gbl_power then
        txt_set(txt_com, string.format("%07.03f",com/1000, com%1000) )
        txt_set(txt_comstby, string.format("%07.03f",comstby/1000, comstby%1000))
        txt_set(txt_nav, string.format("%06.02f",nav/100, nav%100))
        txt_set(txt_navstby, string.format("%06.02f",navstby/100, navstby%100) )
    else
        txt_set(txt_com, " ")
        txt_set(txt_comstby, " ")
        txt_set(txt_nav, " ")
        txt_set(txt_navstby, " ")
    end
    
    switch_set_position(switch_onoff, com_pwr)
    
end

function new_navcomm_FSX(nav1, nav1stby, com1, com1stby, nav2, nav2stby, com2, com2stby, bus_volts, avionics)

    avionics = fif(avionics, 1, 0)
    new_navcomm(nav1*100+0.01, nav1stby*100+0.01, com1*1000+0.01, com1stby*1000+0.01, nav2*100+0.01, nav2stby*100+0.01, com2*1000+0.01, com2stby*1000+0.01, 1, 1, {bus_volts}, avionics)
    
end

-- Switches, buttons and dials --
switch_onoff = switch_add("offswitch.png","onswitch.png",61,154,47,47, new_onoff)
comtransfer = button_add("switchfreq.png", "switchfreqpressed.png", 130, 135, 60, 38, new_comtransfer)
navtransfer = button_add("switchfreq.png", "switchfreqpressed.png", 487, 135, 60, 38, new_navtransfer)
-- channel_chg = button_add(nil, nil, 507, 193, 18, 18, channel_chg_callback)
combig = dial_add("dialbig.png", 209, 93, 126, 126, new_combig)
comsmall = dial_add("dialsmall.png", 243, 127, 58, 58, new_comsmall)
navbig = dial_add("dialbig.png", 574, 93, 126, 126, new_navbig)
navsmall = dial_add("dialsmall.png", 608, 127, 58, 58, new_navsmall)
img_add("navswitch.png", 414, 156, 38, 38)

-- Bus subscribe --
xpl_dataref_subscribe("sim/cockpit/radios/nav1_freq_hz", "INT", 
                      "sim/cockpit/radios/nav1_stdby_freq_hz", "INT",
                      "sim/cockpit2/radios/actuators/com1_frequency_hz_833", "INT",
                      "sim/cockpit2/radios/actuators/com1_standby_frequency_hz_833", "INT",
                      "sim/cockpit/radios/nav2_freq_hz", "INT", 
                      "sim/cockpit/radios/nav2_stdby_freq_hz", "INT",
                      "sim/cockpit2/radios/actuators/com2_frequency_hz_833", "INT",
                      "sim/cockpit2/radios/actuators/com2_standby_frequency_hz_833", "INT", 
                      "sim/cockpit2/radios/actuators/com1_power", "INT",
                      "sim/cockpit2/radios/actuators/com2_power", "INT",
                      "sim/cockpit2/electrical/bus_volts", "FLOAT[6]", 
                      "sim/cockpit/electrical/avionics_on", "INT", new_navcomm)
fsx_variable_subscribe("NAV ACTIVE FREQUENCY:1", "Mhz",
                       "NAV STANDBY FREQUENCY:1", "Mhz",
                       "COM ACTIVE FREQUENCY:1", "Mhz",
                       "COM STANDBY FREQUENCY:1", "Mhz",
                       "NAV ACTIVE FREQUENCY:2", "Mhz",
                       "NAV STANDBY FREQUENCY:2", "Mhz",
                       "COM ACTIVE FREQUENCY:2", "Mhz",
                       "COM STANDBY FREQUENCY:2", "Mhz", 
                       "ELECTRICAL AVIONICS BUS VOLTAGE", "Volts", 
                       "AVIONICS MASTER SWITCH", "Bool", new_navcomm_FSX)
fs2020_variable_subscribe("NAV ACTIVE FREQUENCY:1", "Mhz",
                          "NAV STANDBY FREQUENCY:1", "Mhz",
                          "COM ACTIVE FREQUENCY:1", "Mhz",
                          "COM STANDBY FREQUENCY:1", "Mhz",
                          "NAV ACTIVE FREQUENCY:2", "Mhz",
                          "NAV STANDBY FREQUENCY:2", "Mhz",
                          "COM ACTIVE FREQUENCY:2", "Mhz",
                          "COM STANDBY FREQUENCY:2", "Mhz", 
                          "ELECTRICAL MAIN BUS VOLTAGE", "Volts", 
                          "AVIONICS MASTER SWITCH", "Bool", new_navcomm_FSX)                              

And the startup sequence will be as in the video.

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

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

Re: Airmanager via pico-projectors

#15 Post by JackZ »

And the DAVTRON M903I is ready for testing.
I don't have the A2A aircraft, so I have no clue if it will work as is, but on a standard P3D Turbo Commander, the gauge works as expected.

Both NAV1 and NAV 2 are working and the correct Ident identifier is displayed when a proper VOR Station is tuned.
The LOC display now work as it "should"
Tried to comprehend the official manual, which is rather limited.
https://www.davtron.com/cmsAdmin/upload ... ochure.pdf

Please test and report

Jacques

Generic - DAVTRON M903 v100.siff
(116.48 KiB) Downloaded 20 times
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

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

Re: Airmanager via pico-projectors

#16 Post by JackZ »

vangyver wrote: Fri Jun 17, 2022 1:40 pm Maybe Sim Innovations removed it ?
Vangyver
I dunno, @Sling is the KeyMaster now, only him knows...
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: 6619
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Airmanager via pico-projectors

#17 Post by Ralph »

I think that it was removed on his request, but I'm not absolutely sure, it's a long time ago.

vangyver
Posts: 111
Joined: Sat Dec 05, 2015 8:30 am

Re: Airmanager via pico-projectors

#18 Post by vangyver »

PM sent to JackZ regarding Davtron.
Vangyver

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

Re: Airmanager via pico-projectors

#19 Post by JackZ »

As I don't own the A2A Chrokee, I have no way to test the Davtron gauge thoroughly.

Nonetheless the gauge itself is independent, so the two switches are handled internally in the AM instrument with no input at all from the A2A gauge. No big deal for a home cockpit, since the original gauge is no longer used.

Thanks to Vangyver test, I modified the LOC display, turned out that the LOC display deviation was way more sensitive (x4) when displaying the track error.

This is fixed now, I think.
Generic - DAVTRON M903 v110.siff
(116.77 KiB) Downloaded 22 times
Jacques
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

User avatar
Sling
Posts: 4858
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Airmanager via pico-projectors

#20 Post by Sling »

JackZ wrote: Fri Jun 17, 2022 9:00 pm
vangyver wrote: Fri Jun 17, 2022 1:40 pm Maybe Sim Innovations removed it ?
Vangyver
I dunno, @Sling is the KeyMaster now, only him knows...
I know nothing of this instrument. If it was removed it must of been quite a while ago. Ralph’s suggestion is probably correct.

Post Reply