[chirp_devel] [PATCH 0 of 3 ] More work from #1149
This 3 patches come from the #1149 but only the first is related to the radio while the other two are valid for all radios and can they can be committed alone
73 de IZ3GME Marco
# HG changeset patch # User Marco Filippi iz3gme.marco@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
Since you're changing this,
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) :
Can you put the space between the ), > and 6 characters to be in line with the rest of the formatting?
Thanks!
# HG changeset patch # User Marco Filippi iz3gme.marco@gmail.com # Date 1380188391 -7200 # Node ID 7d9d327bda6acf332dc92eb4fe52f18e48c37ad2 # Parent 6c079c6f360594f621a81e3f99104ccea07fd45f [memedit] Better formatting for the "Error setting memory" message Noticed while implementing #1149
diff --git a/chirpui/memedit.py b/chirpui/memedit.py --- a/chirpui/memedit.py +++ b/chirpui/memedit.py @@ -374,7 +374,7 @@
msgs = self.rthread.radio.validate_memory(mem) if msgs: - common.show_error(_("Error setting memory") + \ + common.show_error(_("Error setting memory") + ": " + \ "\r\n\r\n".join(msgs)) self.prefill() return
# HG changeset patch # User Marco Filippi iz3gme.marco@gmail.com # Date 1380188391 -7200 # Node ID 675f169203098f2bc7794342aa8e62062a689a5d # Parent 7d9d327bda6acf332dc92eb4fe52f18e48c37ad2 [memedit] Offset value must be positive Noticed while implementing #1149
diff --git a/chirpui/memedit.py b/chirpui/memedit.py --- a/chirpui/memedit.py +++ b/chirpui/memedit.py @@ -120,7 +120,8 @@ return self.rthread.radio.filter_name(new)
def ed_offset(self, _, path, new, __): - return chirp_common.parse_freq(new) + new = chirp_common.parse_freq(new) + return abs(new)
def ed_freq(self, _foo, path, new, colnum): iter = self.store.get_iter(path)
participants (2)
-
Dan Smith
-
Marco Filippi IZ3GME