Skip to content

Commit

Permalink
ga510: Fix ANI group code out of range
Browse files Browse the repository at this point in the history
Fixes #11508
  • Loading branch information
kk7ds committed Aug 31, 2024
1 parent 14c33f1 commit f2a8faa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion chirp/drivers/ga510.py
Original file line number Diff line number Diff line change
Expand Up @@ -855,11 +855,17 @@ def apply_code(setting, obj):

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(
Expand Down

0 comments on commit f2a8faa

Please sign in to comment.