Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tdh8 add only CH mode #719

Merged
merged 1 commit into from
Jul 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions chirp/drivers/tdh8.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@
u8 save;
u8 ligcon;
u8 voxdelay;
u8 alarm;
u8 onlychmode:1,
unused:6,
alarm:1;
} settings;

#seekto 0x0CB8;
Expand Down Expand Up @@ -1155,8 +1157,8 @@ def _get_settings(self):
SYNC_LIST, SYNC_LIST[_settings.sync]))
basic.append(rs)

if _settings.lang == 1:
langs = 0
if _settings.lang in (2, 3):
langs = 1
else:
langs = 0
rs = RadioSetting("lang", "Language",
Expand Down Expand Up @@ -1212,6 +1214,10 @@ def _get_settings(self):
RadioSettingValueBoolean(_settings.rxled))
basic.append(rs)

rs = RadioSetting("onlychmode", "Only CH Mode",
RadioSettingValueBoolean(_settings.onlychmode))
basic.append(rs)

rs = RadioSetting("stopkey1", "SHORT_KEY_TOP",
RadioSettingValueList(
SHORT_KEY_LIST, SHORT_KEY_LIST[0]))
Expand Down Expand Up @@ -1995,6 +2001,9 @@ def fm_validate(value):
list_val.append(0xFF)
lenth_val += 1
self._memobj.group8.group8 = list_val
elif setting == 'lang':
self._memobj.settings.lang = (
str(element.value) == 'English' and 2 or 1)
elif element.value.get_mutable():
setattr(obj, setting, element.value)
except Exception:
Expand Down