# HG changeset patch
# User Jim Unroe <rock.unroe@gmail.com>
# Date 1643685058 18000
#      Mon Jan 31 22:10:58 2022 -0500
# Node ID 4a45eadf1c6637a080701f47dc612a449f811a8c
# Parent  82e6450884170780b033aa8a0cc4d2abebd7b2dd
[FRS-B1] Driver Maintenance: radtel_t18.py [patch 1 of 2]

This patch reorders some of the settings to make it easier to add support
for additional radios. No features have been added to or removed from any of
the currently supported radio models.

related to #9734

diff -r 82e645088417 -r 4a45eadf1c66 chirp/drivers/radtel_t18.py
--- a/chirp/drivers/radtel_t18.py	Mon Jan 17 21:03:14 2022 -0800
+++ b/chirp/drivers/radtel_t18.py	Mon Jan 31 22:10:58 2022 -0500
@@ -714,20 +714,6 @@
             rs = RadioSetting("scan", "Scan",
                               RadioSettingValueBoolean(_settings.scan))
             basic.append(rs)
-
-            rs = RadioSetting("voice", "Voice prompts",
-                              RadioSettingValueBoolean(_settings.voice))
-            basic.append(rs)
-
-            rs = RadioSetting("language", "Language",
-                              RadioSettingValueList(
-                                  VOICE_LIST2,
-                                  VOICE_LIST2[_settings.language]))
-            basic.append(rs)
-
-            rs = RadioSetting("tail", "Tail",
-                              RadioSettingValueBoolean(_settings.tail))
-            basic.append(rs)
         else:
             rs = RadioSetting("scanmode", "Scan mode",
                               RadioSettingValueList(
@@ -735,12 +721,31 @@
                                   SCANMODE_LIST[_settings.scanmode]))
             basic.append(rs)
 
-            rs = RadioSetting("voiceprompt", "Voice prompt",
+        if self.MODEL == "RT22S":
+            rs = RadioSetting("voiceprompt", "Voice prompts",
+                              RadioSettingValueBoolean(_settings.voiceprompt))
+            basic.append(rs)
+        elif self.MODEL == "RB18" or self.MODEL == "RB618":
+            rs = RadioSetting("voice", "Voice prompts",
+                              RadioSettingValueBoolean(_settings.voice))
+            basic.append(rs)
+        else:
+            rs = RadioSetting("voiceprompt", "Voice prompts",
                               RadioSettingValueList(
                                   VOICE_LIST,
                                   VOICE_LIST[_settings.voiceprompt]))
             basic.append(rs)
 
+        rs = RadioSetting("batterysaver", "Battery saver",
+                          RadioSettingValueBoolean(_settings.batterysaver))
+        basic.append(rs)
+
+        if self.MODEL != "RB75":
+            rs = RadioSetting("beep", "Beep",
+                              RadioSettingValueBoolean(_settings.beep))
+            basic.append(rs)
+
+        if self.MODEL != "RB18" and self.MODEL != "RB618":
             rs = RadioSetting("voxlevel", "Vox level",
                               RadioSettingValueList(
                                   VOXLEVEL_LIST,
@@ -753,14 +758,6 @@
                                   VOXDELAY_LIST[_settings.voxdelay]))
             basic.append(rs)
 
-        rs = RadioSetting("batterysaver", "Battery saver",
-                          RadioSettingValueBoolean(_settings.batterysaver))
-        basic.append(rs)
-
-        rs = RadioSetting("beep", "Beep",
-                          RadioSettingValueBoolean(_settings.beep))
-        basic.append(rs)
-
         if self.MODEL == "RT22S":
             rs = RadioSetting("sidekey2", "Side Key 2(Long)",
                               RadioSettingValueList(
@@ -769,6 +766,16 @@
             basic.append(rs)
 
         if self.MODEL == "RB18" or self.MODEL == "RB618":
+            rs = RadioSetting("language", "Language",
+                              RadioSettingValueList(
+                                  VOICE_LIST2,
+                                  VOICE_LIST2[_settings.language]))
+            basic.append(rs)
+
+            rs = RadioSetting("tail", "Tail",
+                              RadioSettingValueBoolean(_settings.tail))
+            basic.append(rs)
+
             rs = RadioSetting("hivoltnotx", "High voltage no TX",
                               RadioSettingValueBoolean(_settings.hivoltnotx))
             basic.append(rs)
