[chirp_devel] [PATCH 4 of 4] [RT22] Add Retevis RT622 Model

Jim Unroe
Wed Dec 16 20:09:11 PST 2020


# HG changeset patch
# User Jim Unroe <rock.unroe at gmail.com>
# Date 1608177632 18000
#      Wed Dec 16 23:00:32 2020 -0500
# Node ID 16374d1150ae44d39f45b1bb11314bb99f1ccb4b
# Parent  12fa9403476f300d87cca6b92102f51d4a8349d6
[RT22] Add Retevis RT622 Model

This patch adds support for the Retevis RT622 PMR446 version.

related to #6467

diff -r 12fa9403476f -r 16374d1150ae chirp/drivers/retevis_rt22.py
--- a/chirp/drivers/retevis_rt22.py	Wed Dec 16 22:53:55 2020 -0500
+++ b/chirp/drivers/retevis_rt22.py	Wed Dec 16 23:00:32 2020 -0500
@@ -1,4 +1,4 @@
-# Copyright 2016 Jim Unroe <rock.unroe at gmail.com>
+# Copyright 2016-2020 Jim Unroe <rock.unroe at gmail.com>
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -108,6 +108,11 @@
              462.7125, 462.5500, 462.5750, 462.6000,
              462.6500, 462.6750, 462.7000, 462.7250]
 
+PMR_FREQS = [446.00625, 446.01875, 446.03125, 446.04375,
+             446.05625, 446.06875, 446.08125, 446.09375,
+             446.10625, 446.11875, 446.13125, 446.14375,
+             446.15625, 446.16875, 446.18125, 446.19375]
+
 
 def _ident_from_data(data):
     return data[0x1B8:0x1C0]
@@ -550,6 +555,11 @@
                 _mem.rxfreq = _mem.txfreq = FRS_FREQ
                 _mem.wide = False
                 _mem.highpower = True
+            elif self.MODEL == "RT622":
+                PMR_FREQ = int(PMR_FREQS[mem.number - 1] * 100000)
+                _mem.rxfreq = _mem.txfreq = PMR_FREQ
+                _mem.wide = False
+                _mem.highpower = False
             else:
                 _mem.set_raw("\xFF" * (_mem.size() / 8))
             return
@@ -726,3 +736,11 @@
     MODEL = "RT22FRS"
 
     _fileid = ["P3207!", ]
+
+
+ at directory.register
+class RT622(RT22Radio):
+    VENDOR = "Retevis"
+    MODEL = "RT622"
+
+    _fileid = ["P3207!", ]



More information about the chirp_devel mailing list