Merge branch 'develop' of https://github.com/khopa/dcs_liberation into develop

This commit is contained in:
Khopa 2020-11-08 23:24:24 +01:00
commit 4c394a9e2d
2 changed files with 20 additions and 3 deletions

View File

@ -161,8 +161,12 @@ class ChannelNamer:
return f"COMM{radio_id} Ch {channel_id}"
class FarmerChannelNamer(ChannelNamer):
"""Channel namer for the MiG-19P."""
class SingleRadioChannelNamer(ChannelNamer):
"""Channel namer for the aircraft with only a single radio.
Aircraft like the MiG-19P and the MiG-21bis only have a single radio, so
it's not necessary for us to name the radio when naming the channel.
"""
@staticmethod
def channel_name(radio_id: int, channel_id: int) -> str:
@ -589,7 +593,17 @@ AIRCRAFT_DATA: Dict[str, AircraftData] = {
inter_flight_radio=get_radio("RSIU-4V"),
intra_flight_radio=get_radio("RSIU-4V"),
channel_allocator=FarmerRadioChannelAllocator(),
channel_namer=FarmerChannelNamer
channel_namer=SingleRadioChannelNamer
),
"MiG-21Bis": AircraftData(
inter_flight_radio=get_radio("RSIU-5V"),
intra_flight_radio=get_radio("RSIU-5V"),
channel_allocator=CommonRadioChannelAllocator(
inter_flight_radio_index=1,
intra_flight_radio_index=1
),
channel_namer=SingleRadioChannelNamer,
),
"P-51D": AircraftData(

View File

@ -133,6 +133,9 @@ RADIOS: List[Radio] = [
# MiG-19P
Radio("RSIU-4V", MHz(100), MHz(150), step=MHz(1)),
# MiG-21bis
Radio("RSIU-5V", MHz(100), MHz(150), step=MHz(1)),
# Ka-50
# Note: Also capable of 100MHz-150MHz, but we can't model gaps.
Radio("R-800L1", MHz(220), MHz(400), step=kHz(25)),