size={900,90} 


local digital = loadFont('digital.ttf')
local clRed = {0.9,0.09,0.09, 0.9}
local clRedDark = {0.9, 0.09, 0.09, 0.3}

a1_freq = globalProperty("sim/cockpit2/radios/actuators/adf1_frequency_hz")
a2_freq = globalProperty("sim/cockpit2/radios/actuators/adf2_frequency_hz")


function draw()
	drawAll(components)
	if get(avionics_on) == 1 then
		drawText(digital, 0, 0, string.format("%04d", get(a1_freq)), 20, false, false, TEXT_ALIGN_CENTER, clRed)
	end
	drawText(digital, 0, 0, "0000", 20, true, false, TEXT_ALIGN_CENTER, clRedDark)
	if get(avionics_on) == 1 then
		drawText(digital, 50, 0, string.format("%04d", get(a2_freq)), 20, false, false, TEXT_ALIGN_CENTER, clRed)
	end
	drawText(digital, 50, 0, "0000", 20, true, false, TEXT_ALIGN_CENTER, clRedDark)


	
end