size={900,80} 

local digital = loadFont('digital.ttf')
local clRed = {0.9, 0.09, 0.09, 0.9}
local clRedDark = {0.9, 0.09, 0.09, 0.25}
c1_freqM = globalProperty("sim/cockpit2/radios/actuators/com1_frequency_Mhz")
c1_freqK = globalProperty("sim/cockpit2/radios/actuators/com1_frequency_khz")

function draw()
	drawAll(components)
	if get(avionics_on) == 1 then
		drawText(digital, 70, 10, string.format("%d.%.3d", get(c1_freqM), get(c1_freqK)), 45, false, false, TEXT_ALIGN_CENTER, clRed)
	end
		drawText(digital, 70, 10, "000.000", 45, false, false, TEXT_ALIGN_CENTER, clRedDark)
end