defineProperty("AVpower", globalProperty("sim/cockpit2/switches/avionics_power_on"))
defineProperty("APUgen", globalProperty("sim/cockpit2/electrical/APU_generator_on"))
defineProperty("gen1", globalProperty("sim/cockpit2/electrical/generator_on[0]"))
defineProperty("gen2", globalProperty("sim/cockpit2/electrical/generator_on[1]"))

function update()

	if get(APUgen) == 0 and get(gen1) == 0 and get(gen2) == 0 then
	set(AVpower, 0)
	
	
	end
end