Skip to content

Commit

Permalink
uv17Pro: Fix handling out-of-range hangup time
Browse files Browse the repository at this point in the history
This update fixes issue #10971, where an error was shown when the
radio reports an invalid value for the hangup time.

Fixes #10971
  • Loading branch information
vdwel authored and kk7ds committed Nov 28, 2023
1 parent 5ac5cb6 commit ee75158
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion chirp/drivers/baofeng_uv17Pro.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,10 +789,14 @@ def apply_bankname(setting, obj):
_mem.ani.aniid]))
dtmfe.append(rs)

if _mem.settings.hangup >= len(LIST_HANGUPTIME):
val = 0
else:
val = _mem.settings.hangup
rs = RadioSetting("settings.hangup", "Hang-up time",
RadioSettingValueList(LIST_HANGUPTIME,
LIST_HANGUPTIME[
_mem.settings.hangup]))
val]))
dtmfe.append(rs)

return top
Expand Down

0 comments on commit ee75158

Please sign in to comment.