[chirp_devel] [PATCH 1 of 3] [uv-b5] Add validation for max offset

Marco Filippi IZ3GME
Sat Sep 28 03:30:52 PDT 2013


# HG changeset patch
# User Marco Filippi <iz3gme.marco at gmail.com>
# Date 1380363907 -7200
# Node ID d3d1557f76dda8f060d5b4b306b333a2514c7b89
# Parent  ac65038940f227d46ba28186627b42108dae6447
[uv-b5] Add validation for max offset
Noticed while implementing #1149

diff -r ac65038940f2 -r d3d1557f76dd chirp/uvb5.py
--- a/chirp/uvb5.py	Thu Sep 26 11:39:51 2013 +0200
+++ b/chirp/uvb5.py	Sat Sep 28 12:25:07 2013 +0200
@@ -420,7 +420,8 @@
     def validate_memory(self, mem):
         msgs = chirp_common.CloneModeRadio.validate_memory(self, mem)
 
-        if mem.duplex == "split" and abs(mem.freq - mem.offset)>69995000:
+        if (mem.duplex == "split" and abs(mem.freq - mem.offset) > 69995000) or \
+                (mem.duplex in ["+", "-"] and mem.offset > 69995000) :
             msgs.append(chirp_common.ValidationError(
                     "Max split is 69.995MHz"))
         return msgs



More information about the chirp_devel mailing list