Skip to content

Commit

Permalink
make match the key action list to the one of the Radio menu
Browse files Browse the repository at this point in the history
display the list key action as the radio show it
  • Loading branch information
joc2 committed Jan 14, 2024
1 parent 4081949 commit 0936df5
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions uvk5_egzumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,19 +480,19 @@
DTMF_CODE_CHARS = "ABCD*# "
DTMF_DECODE_RESPONSE_LIST = ["DO NOTHING", "RING", "REPLY", "BOTH"]

KEYACTIONS_LIST = ["None",
"Flashlight",
"Power",
"Monitor",
"Scan",
KEYACTIONS_LIST = ["NONE",
"FLASHLIGHT",
"POWER",
"MONITOR",
"SCAN",
"VOX",
"Alarm",
"FM radio",
"1750Hz tone",
"Lock keypad",
"Switch main VFO",
"Switch frequency/memory mode",
"Switch demodulation"
"ALARM",
"FM RADIO",
"1750Hz TONE",
"LOCK KEYPAD",
"Switch main VFO (SWITCH VFO)",
"Switch frequency/memory mode (VFO/MR)",
"Switch demodulation (SWITCH DEMODUL)"
]

MIC_GAIN_LIST = ["+1.1dB","+4.0dB","+8.0dB","+12.0dB","+15.1dB"]
Expand Down Expand Up @@ -1572,11 +1572,11 @@ def GetActualKeyAction(actionNum):
hasFlashlight = self._memobj.BUILD_OPTIONS.ENABLE_FLASHLIGHT
lst = KEYACTIONS_LIST.copy()
if not hasAlarm:
lst.remove("Alarm")
lst.remove("ALARM")
if not has1750:
lst.remove("1750Hz tone")
lst.remove("1750Hz TONE")
if not hasFlashlight:
lst.remove("Flashlight")
lst.remove("FLASHLIGHT")

actionNum = int(actionNum)
if actionNum >= len(KEYACTIONS_LIST) or KEYACTIONS_LIST[actionNum] not in lst:
Expand Down

0 comments on commit 0936df5

Please sign in to comment.