ga510: Fix ANI group code out of range

Fixes #11508
This commit is contained in:
Dan Smith 2024-08-29 17:16:19 -07:00 committed by Dan Smith
parent f8dbe754f7
commit 10623249d0

View File

@ -855,11 +855,17 @@ class RadioddityGA510Radio(chirp_common.CloneModeRadio):
dtmf.append(rs)
try:
current_group = DTMFCHARS[int(anicode.groupcode)]
except IndexError:
LOG.warning('ANI group code index %i out of range',
anicode.groupcode)
current_group = DTMFCHARS[0]
dtmf.append(
RadioSetting(
"anicode.groupcode", "Group Code",
RadioSettingValueList(list(DTMFCHARS),
DTMFCHARS[int(anicode.groupcode)])))
current_group)))
else:
dtmf.append(