Jump to content

ARC-210 Modulation issue


Recommended Posts

Hello,

when you set a frequency into the mission editor on the ARC-210, some frequencies are automaticly set to AM or to FM, According this table.

Capture d'écran 2023-05-28 125745.png

Unfortunatly the mission editor doesn't allow us to change manually the modulation, the button is desactivated.

Screen_230528_125609.jpg

In cockpit the ARC-210 doens't care about de mission editor modulation. Every frequencies are in AM modulation. But if you tune manually a frequency in range 136 - 155.975 the FM modulation is automaticly applied. However you can change the modulation manually with the modulation button on the arc-210 panel. You can even change the modulation on the compatible frequencies in the COM page.

I think there is a problem with the mission editor.

 

test arc210.trk

  • Thanks 1
Link to comment
Share on other sites

This had me intrigued, so I looked into it. It seems that the problem lies in the radio modulation definition in \CoreMods\aircraft\A-10\A-10C_2.lua:

	panelRadio = {
			[1] = {  
			    name = _("UHF/VHF: ARC-210"),
				range = {
					{min =  30.0, max =  87.975, modulation	= MODULATION_FM},
					{min = 108.0, max = 135.995, modulation	= MODULATION_AM},
					{min = 136.0, max = 155.995, modulation	= MODULATION_FM}, -- HERE
					{min = 156.0, max = 173.975, modulation	= MODULATION_FM},
					{min = 225.0, max = 399.975, modulation	= MODULATION_AM}  -- AND HERE
					},

In \MissionEditor\modules\me_panelRadio.lua, if it finds a frequency within a defined range (in this case, 136-155.995), it will populate the combo box depending on the radio's modulation. Given that it is set to MODULATION_FM and MODULATION_AM, respectively, that is all that is populated and then it is disabled:

	if a_type == DB.MODULATION_AM_AND_FM then
		local item = ListBoxItem.new(cdata.modulationName[DB.MODULATION_AM])
		item.modulation = DB.MODULATION_AM
		a_comboList:insertItem(item)
		
		local item = ListBoxItem.new(cdata.modulationName[DB.MODULATION_FM])
		item.modulation = DB.MODULATION_FM
		a_comboList:insertItem(item)
		a_comboList:setEnabled(true)
	else
		local item = ListBoxItem.new(cdata.modulationName[a_type])
		item.modulation = a_type
		a_comboList:insertItem(item)
		a_comboList:setEnabled(false) -- HERE
	end

To get it to drop into the IF logic instead of the ELSE logic, ED will need to alter the frequency range's modulation to MODULATION_AM_AND_FM.

That leaves the issue of how it will set the default modulation since it is not provided anywhere.

Something like this would work:

	panelRadio = {
			[1] = {  
			    name = _("UHF/VHF: ARC-210"),
				range = {
					{min =  30.0, max =  87.975, modulation	= MODULATION_FM},
					{min = 108.0, max = 135.995, modulation	= MODULATION_AM},
					{min = 136.0, max = 155.995, modulation	= MODULATION_AM_AND_FM, default = MODULATION_FM}, -- notice the dffault property
					{min = 156.0, max = 173.975, modulation	= MODULATION_FM},
					{min = 225.0, max = 399.975, modulation	= MODULATION_AM_AND_FM, default = MODULATION_AM}  -- and here, based on Table 1 (shown above)
					},

Then one would need to alter the IF/ELSE logic in \MissionEditor\modules\me_panelRadio.lua to something similar to:

-- found in getModulationOfRange()
if a_frequency >= v.min and a_frequency <= v.max then
	return v.modulation, default -- return the default property also

-- found in createRadio()
local frModulation, mod_default = getModulationOfRange(radio.range, channel.default*koef) -- capture the default property
-- a bit later in the same function...
local function fillModulationList(a_comboList, a_type, mod_default) -- pass it into the function that populates the combo box

-- found in fillModulationList()
if not mod_default then -- if default modulation is not provided
	a_comboList:selectItem(a_comboList:getItem(0))
else -- if it is
	setModulationInComboList(a_comboList, mod_default) -- then set it
end

Obviously, this will not pass IC at this time. I hope this will help ED fix this issue so that it can be released in a timely manner. 🙂

  • Like 3
Link to comment
Share on other sites

  • 1 month later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...