[chirp_devel] [PATCH 1 of 3] [uv-b5] Add validation for max offset
Marco Filippi IZ3GME
Thu Sep 26 02:48:04 PDT 2013
# HG changeset patch
# User Marco Filippi <iz3gme.marco at gmail.com>
# Date 1380188391 -7200
# Node ID 6c079c6f360594f621a81e3f99104ccea07fd45f
# Parent 2613ace47d8bed6fae116ded2ec373c1cafaeb95
[uv-b5] Add validation for max offset
Noticed while implementing #1149
diff --git a/chirp/uvb5.py b/chirp/uvb5.py
--- a/chirp/uvb5.py
+++ b/chirp/uvb5.py
@@ -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