-- main.lua


size={4096,4096} 
panelWidth3d = 4096  
panelHeight3d = 4096  


avionics_on = globalProperty("sim/cockpit/electrical/avionics_on")
hide_yoke = globalProperty("sim/graphics/view/hide_yoke")
heading_dial_deg_mag_pilot = globalProperty("sim/cockpit2/autopilot/heading_dial_deg_mag_pilot")
nav1_obs_deg_mag_pilot = globalProperty("sim/cockpit2/radios/actuators/nav1_obs_deg_mag_pilot")
flight_time = globalProperty("sim/time/total_flight_time_sec")

local elapsed = math.floor(get(flight_time))

-- TODO tresholdSec
function updateTimed(cb, tresholdSec)
	if math.floor(get(flight_time)) > elapsed then
		cb()
		elapsed = math.floor(get(flight_time))
	end
end

--set(hide_yoke, 0)
set(heading_dial_deg_mag_pilot, 0)
set(nav1_obs_deg_mag_pilot, 0)

screenHeight = globalProperty("sim/graphics/view/window_height")
screenWidth = globalProperty("sim/graphics/view/window_width")

components = {
	pitot {}, 
	engine {},
    prop {},
    switches {},
    lights {},
    cockpit {},
    comradio {
        position={0*8,0*2,450*8,150*2}
    },
    nav1_radio {
        position={0*8,8*2,450*8,150*2}
    },
    nav2_radio {
        position={73*8,8*2,450*8,150*2}
    },
    adf_radio {
        position={182*8,110*2,800*8,350*2}
    },
    transponder {
        position={1845,350,2300,490}
    },
    dme {
        position={1150,316,1432,135}
    },
    autopilot {
        position={625,500,600,80}
	},
	qnh {
       position={618,586,863,48}
   },
    regnum {
        position={656,696,2400,220},

    },
    overhead {},
	librain{}	
}