View | Details | Raw Unified | Return to bug 217499 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-2 / +3 lines)
Lines 2-8 Link Here
2
2
3
PORTNAME=	chirp
3
PORTNAME=	chirp
4
PORTVERSION=	0.4.1
4
PORTVERSION=	0.4.1
5
PORTREVISION=	3
5
PORTREVISION=	4
6
CATEGORIES=	comms hamradio
6
CATEGORIES=	comms hamradio
7
MASTER_SITES=	http://chirp.danplanet.com/download/${PORTVERSION}/ \
7
MASTER_SITES=	http://chirp.danplanet.com/download/${PORTVERSION}/ \
8
		LOCAL/db
8
		LOCAL/db
Lines 15-21 Link Here
15
BUILD_DEPENDS=	${CHIRP_DEPENDS}
15
BUILD_DEPENDS=	${CHIRP_DEPENDS}
16
RUN_DEPENDS=	${CHIRP_DEPENDS}
16
RUN_DEPENDS=	${CHIRP_DEPENDS}
17
CHIRP_DEPENDS=	${PYTHON_PKGNAMEPREFIX}libxml2>0:textproc/py-libxml2 \
17
CHIRP_DEPENDS=	${PYTHON_PKGNAMEPREFIX}libxml2>0:textproc/py-libxml2 \
18
		${PYTHON_PKGNAMEPREFIX}serial>0:comms/py-serial
18
		${PYTHON_PKGNAMEPREFIX}serial>0:comms/py-serial \
19
		${PYTHON_PKGNAMEPREFIX}gtk2>0:x11-toolkits/py-gtk2
19
20
20
USES=		desktop-file-utils gettext python
21
USES=		desktop-file-utils gettext python
21
USE_PYTHON=	distutils
22
USE_PYTHON=	distutils
(-)files/patch-chirp_anytone.py (+11 lines)
Line 0 Link Here
1
--- chirp/anytone.py.orig	2014-01-11 08:01:32 UTC
2
+++ chirp/anytone.py
3
@@ -193,7 +193,7 @@ def _read(radio, length):
4
 valid_model = ['QX588UV', 'HR-2040', 'DB-50M\x00', 'DB-750X']
5
 
6
 def _ident(radio):
7
-    radio.pipe.setTimeout(1)
8
+    radio.pipe.timeout = 1
9
     _echo_write(radio, "PROGRAM")
10
     response = radio.pipe.read(3)
11
     if response != "QX\x06":
(-)files/patch-chirp_detect.py (+29 lines)
Line 0 Link Here
1
--- chirp/detect.py.orig	2017-03-02 16:41:11 UTC
2
+++ chirp/detect.py
3
@@ -37,7 +37,7 @@ def _detect_icom_radio(ser):
4
     # ICOM VHF/UHF Clone-type radios @ 9600 baud
5
 
6
     try:
7
-        ser.setBaudrate(9600)
8
+        ser.baudrate = 9600
9
         md = icf.get_model_data(ser)
10
         return _icom_model_data_to_rclass(md)
11
     except errors.RadioError, e:
12
@@ -45,7 +45,7 @@ def _detect_icom_radio(ser):
13
 
14
     # ICOM IC-91/92 Live-mode radios @ 4800/38400 baud
15
 
16
-    ser.setBaudrate(4800)
17
+    ser.baudrate = 4800
18
     try:
19
         ic9x_ll.send_magic(ser)
20
         return _icom_model_data_to_rclass("ic9x")
21
@@ -56,7 +56,7 @@ def _detect_icom_radio(ser):
22
 
23
     for rate in [9600, 4800, 19200]:
24
         try:
25
-            ser.setBaudrate(rate)
26
+            ser.baudrate = rate
27
             return icomciv.probe_model(ser)
28
         except errors.RadioError:
29
             pass
(-)files/patch-chirp_ft2800.py (+11 lines)
Line 0 Link Here
1
--- chirp/ft2800.py.orig	2012-09-11 07:00:53 UTC
2
+++ chirp/ft2800.py
3
@@ -205,7 +205,7 @@ class FT2800Radio(YaesuCloneModeRadio):
4
         self.process_mmap()
5
 
6
     def sync_out(self):
7
-        self.pipe.setTimeout(1)
8
+        self.pipe.timeout = 1
9
         self.pipe.setParity("E")
10
         start = time.time()
11
         try:
(-)files/patch-chirp_ft50__ll.py (+11 lines)
Line 0 Link Here
1
--- chirp/ft50_ll.py.orig	2012-02-15 19:46:54 UTC
2
+++ chirp/ft50_ll.py
3
@@ -60,7 +60,7 @@ def read_exact(s, count):
4
 def download(radio):
5
     data = ""
6
 
7
-    radio.pipe.setTimeout(1)
8
+    radio.pipe.timeout = 1
9
 
10
     for block in radio._block_lengths:
11
         print "Doing block %i" % block
(-)files/patch-chirp_ft817.py (+11 lines)
Line 0 Link Here
1
--- chirp/ft817.py.orig	2014-10-07 21:59:49 UTC
2
+++ chirp/ft817.py
3
@@ -329,7 +329,7 @@ class FT817Radio(yaesu_clone.YaesuCloneM
4
     
5
     def _clone_in(self):
6
         # Be very patient with the radio
7
-        self.pipe.setTimeout(2)
8
+        self.pipe.timeout = 2
9
     
10
         start = time.time()
11
     
(-)files/patch-chirp_ft90.py (+11 lines)
Line 0 Link Here
1
--- chirp/ft90.py.orig	2014-02-22 08:01:32 UTC
2
+++ chirp/ft90.py
3
@@ -252,7 +252,7 @@ class FT90Radio(yaesu_clone.YaesuCloneMo
4
     
5
     def _clone_in(self):
6
         # Be very patient with the radio
7
-        self.pipe.setTimeout(4)
8
+        self.pipe.timeout = 4
9
         start = time.time()
10
     
11
         data = ""
(-)files/patch-chirp_ftm350.py (+20 lines)
Line 0 Link Here
1
--- chirp/ftm350.py.orig	2013-05-28 07:01:34 UTC
2
+++ chirp/ftm350.py
3
@@ -109,7 +109,7 @@ def _safe_read(radio, length):
4
 def _clone_in(radio):
5
     data = ""
6
 
7
-    radio.pipe.setTimeout(1)
8
+    radio.pipe.timeout = 1
9
     attempts = 30
10
 
11
     data = memmap.MemoryMap("\x00" * (radio._memsize + 128))
12
@@ -156,7 +156,7 @@ def _clone_in(radio):
13
     return data
14
 
15
 def _clone_out(radio):
16
-    radio.pipe.setTimeout(1)
17
+    radio.pipe.timeout = 1
18
 
19
     # Seriously, WTF Yaesu?
20
     ranges = [
(-)files/patch-chirp_ic9x.py (+11 lines)
Line 0 Link Here
1
--- chirp/ic9x.py.orig	2014-10-07 21:59:50 UTC
2
+++ chirp/ic9x.py
3
@@ -94,7 +94,7 @@ class IC9xRadio(icf.IcomLiveRadio):
4
         icf.IcomLiveRadio.__init__(self, *args, **kwargs)
5
 
6
         if self.pipe:
7
-            self.pipe.setTimeout(0.1)
8
+            self.pipe.timeout = 0.1
9
 
10
         self.__memcache = {}
11
         self.__bankcache = {}
(-)files/patch-chirp_ic9x__ll.py (+33 lines)
Line 0 Link Here
1
--- chirp/ic9x_ll.py.orig	2017-03-02 16:42:21 UTC
2
+++ chirp/ic9x_ll.py
3
@@ -419,9 +419,9 @@ def send_magic(pipe):
4
         if resp:
5
             return
6
         print "Switching from 38400 to 4800"
7
-        pipe.setBaudrate(4800)
8
+        pipe.baudrate = 4800
9
         resp = _send_magic_4800(pipe)
10
-        pipe.setBaudrate(38400)
11
+        pipe.baudrate = 38400
12
         if resp:
13
             return
14
         raise errors.RadioError("Radio not responding")
15
@@ -430,15 +430,15 @@ def send_magic(pipe):
16
         if resp:
17
             return
18
         print "Switching from 4800 to 38400"
19
-        pipe.setBaudrate(38400)
20
+        pipe.baudrate = 38400
21
         resp = _send_magic_38400(pipe)
22
         if resp:
23
             return
24
-        pipe.setBaudrate(4800)
25
+        pipe.baudrate = 4800
26
         raise errors.RadioError("Radio not responding")
27
     else:
28
         raise errors.InvalidDataError("Radio in unknown state (%i)" % \
29
-                                          pipe.getBaudrate())    
30
+                                          pipe.baudrate)    
31
 
32
 def get_memory_frame(pipe, vfo, number):
33
     """Get the memory frame for @vfo and @number via @pipe"""
(-)files/patch-chirp_icf.py (+11 lines)
Line 0 Link Here
1
--- chirp/icf.py.orig	2017-03-02 16:43:26 UTC
2
+++ chirp/icf.py
3
@@ -239,7 +239,7 @@ def start_hispeed_clone(radio, cmd):
4
     print "Response:\n%s" % util.hexprint(resp)
5
 
6
     print "Switching to 38400 baud"
7
-    radio.pipe.setBaudrate(38400)
8
+    radio.pipe.baudrate = 38400
9
 
10
     buf = ("\xFE" * 14) + \
11
         "\xEE\xEF" + \
(-)files/patch-chirp_icomciv.py (+11 lines)
Line 0 Link Here
1
--- chirp/icomciv.py.orig	2012-09-11 07:00:53 UTC
2
+++ chirp/icomciv.py
3
@@ -198,7 +198,7 @@ class IcomCIVRadio(icf.IcomLiveRadio):
4
         if self.pipe:
5
             self._willecho = self._detect_echo()
6
             print "Interface echo: %s" % self._willecho
7
-            self.pipe.setTimeout(1)
8
+            self.pipe.timeout = 1
9
 
10
         #f = Frame()
11
         #f.set_command(0x19, 0x00)
(-)files/patch-chirp_kenwood__live.py (+20 lines)
Line 0 Link Here
1
--- chirp/kenwood_live.py.orig	2014-02-22 08:01:32 UTC
2
+++ chirp/kenwood_live.py
3
@@ -77,7 +77,7 @@ def get_id(ser):
4
 
5
     for i in bauds:
6
         print "Trying ID at baud %i" % i
7
-        ser.setBaudrate(i)
8
+        ser.baudrate = i
9
         ser.write("\r")
10
         ser.read(25)
11
         resp = command(ser, "ID")
12
@@ -119,7 +119,7 @@ class KenwoodLiveRadio(chirp_common.Live
13
         self.__memcache = {}
14
 
15
         if self.pipe:
16
-            self.pipe.setTimeout(0.1)
17
+            self.pipe.timeout = 0.1
18
             radio_id = get_id(self.pipe)
19
             if radio_id != self.MODEL.split(" ")[0]:
20
                 raise Exception("Radio reports %s (not %s)" % (radio_id,
(-)files/patch-chirp_puxing.py (+11 lines)
Line 0 Link Here
1
--- chirp/puxing.py.orig	2013-07-17 07:00:51 UTC
2
+++ chirp/puxing.py
3
@@ -351,7 +351,7 @@ class Puxing777Radio(chirp_common.CloneM
4
 
5
 def puxing_2r_prep(radio):
6
     """Do the Puxing 2R identification dance"""
7
-    radio.pipe.setTimeout(0.2)
8
+    radio.pipe.timeout = 0.2
9
     radio.pipe.write("PROGRAM\x02")
10
     ack = radio.pipe.read(1)
11
     if ack != "\x06":
(-)files/patch-chirp_th__uv3r.py (+11 lines)
Line 0 Link Here
1
--- chirp/th_uv3r.py.orig	2013-07-06 07:01:34 UTC
2
+++ chirp/th_uv3r.py
3
@@ -97,7 +97,7 @@ class TYTUV3RRadio(chirp_common.CloneMod
4
         return rf
5
 
6
     def sync_in(self):
7
-        self.pipe.setTimeout(2)
8
+        self.pipe.timeout = 2
9
         self._mmap = tyt_uv3r_download(self)
10
         self.process_mmap()
11
 
(-)files/patch-chirp_th__uvf8d.py (+11 lines)
Line 0 Link Here
1
--- chirp/th_uvf8d.py.orig	2013-11-18 08:01:30 UTC
2
+++ chirp/th_uvf8d.py
3
@@ -79,7 +79,7 @@ def tyt_uvf8d_upload(radio):
4
     """Upload to TYT TH-UVF8D"""
5
     data = uvf8d_identify(radio)
6
 
7
-    radio.pipe.setTimeout(1)
8
+    radio.pipe.timeout = 1
9
 
10
     if data != radio._mmap[:32]:
11
         raise errors.RadioError("Model mis-match: \n%s\n%s" % (util.hexprint(data),
(-)files/patch-chirp_thd72.py (+41 lines)
Line 0 Link Here
1
--- chirp/thd72.py.orig	2017-03-02 16:44:23 UTC
2
+++ chirp/thd72.py
3
@@ -198,7 +198,7 @@ class THD72Radio(chirp_common.CloneModeR
4
 
5
     def _detect_baud(self):
6
         for baud in [9600, 19200, 38400, 57600]:
7
-            self.pipe.setBaudrate(baud)
8
+            self.pipe.baudrate = baud
9
             try:
10
                 self.pipe.write("\r\r")
11
             except:
12
@@ -388,9 +388,11 @@ class THD72Radio(chirp_common.CloneModeR
13
             raise errors.RadioError("No response from self")
14
 
15
         allblocks = range(self._memsize/256)
16
-        self.pipe.setBaudrate(57600)
17
-        self.pipe.getCTS()
18
-        self.pipe.setRTS()
19
+        self.pipe.baudrate = 57600
20
+        try:
21
+            self.pipe.setRTS()
22
+        except AttributeError:
23
+            self.pipe.rts = True
24
         self.pipe.read(1)
25
         data = ""
26
         print "reading blocks %d..%d" % (blocks[0], blocks[-1])
27
@@ -424,9 +426,11 @@ class THD72Radio(chirp_common.CloneModeR
28
         if self.command("0M PROGRAM") != "0M":
29
             raise errors.RadioError("No response from self")
30
 
31
-        self.pipe.setBaudrate(57600)
32
-        self.pipe.getCTS()
33
-        self.pipe.setRTS()
34
+        self.pipe.baudrate = 57600
35
+        try:
36
+            self.pipe.setRTS()
37
+        except AttributeError:
38
+            self.pipe.rts = True
39
         self.pipe.read(1)
40
         print "writing blocks %d..%d" % (blocks[0], blocks[-1])
41
         total = len(blocks)
(-)files/patch-chirp_thuv1f.py (+11 lines)
Line 0 Link Here
1
--- chirp/thuv1f.py.orig	2014-01-02 08:01:50 UTC
2
+++ chirp/thuv1f.py
3
@@ -68,7 +68,7 @@ def uvf1_upload(radio):
4
     """Upload to TYT TH-UVF1"""
5
     data = uvf1_identify(radio)
6
 
7
-    radio.pipe.setTimeout(1)
8
+    radio.pipe.timeout = 1
9
 
10
     if data != radio._mmap[:16]:
11
         raise errors.RadioError("Unable to talk to this model")
(-)files/patch-chirp_tk8102.py (+24 lines)
Line 0 Link Here
1
--- chirp/tk8102.py.orig	2014-10-07 21:59:50 UTC
2
+++ chirp/tk8102.py
3
@@ -91,8 +91,8 @@ def do_ident(radio):
4
     ack = radio.pipe.read(1)
5
 
6
 def do_download(radio):
7
-    radio.pipe.setParity("E")
8
-    radio.pipe.setTimeout(1)
9
+    radio.pipe.parity = "E"
10
+    radio.pipe.timeout = 1
11
     do_ident(radio)
12
 
13
     data = ""
14
@@ -120,8 +120,8 @@ def do_download(radio):
15
     return memmap.MemoryMap(data)
16
 
17
 def do_upload(radio):
18
-    radio.pipe.setParity("E")
19
-    radio.pipe.setTimeout(1)
20
+    radio.pipe.parity = "E"
21
+    radio.pipe.timeout = 1
22
     do_ident(radio)
23
 
24
     for addr in range(0, 0x0400, 8):
(-)files/patch-chirp_tmv71.py (+11 lines)
Line 0 Link Here
1
--- chirp/tmv71.py.orig	2017-03-02 16:55:55 UTC
2
+++ chirp/tmv71.py
3
@@ -32,7 +32,7 @@ class TMV71ARadio(chirp_common.CloneMode
4
 
5
     def _detect_baud(self):
6
         for baud in [9600, 19200, 38400, 57600]:
7
-            self.pipe.setBaudrate(baud)
8
+            self.pipe.baudrate = baud
9
             self.pipe.write("\r\r")
10
             self.pipe.read(32)
11
             try:
(-)files/patch-chirp_uv5r.py (+11 lines)
Line 0 Link Here
1
--- chirp/uv5r.py.orig	2014-10-07 21:59:50 UTC
2
+++ chirp/uv5r.py
3
@@ -372,7 +372,7 @@ def _special_block_from_image(radio):
4
 
5
 def _do_ident(radio, magic):
6
     serial = radio.pipe
7
-    serial.setTimeout(1)
8
+    serial.timeout = 1
9
 
10
     print "Sending Magic: %s" % util.hexprint(magic)
11
     for byte in magic:
(-)files/patch-chirp_uvb5.py (+11 lines)
Line 0 Link Here
1
--- chirp/uvb5.py.orig	2014-10-07 21:59:50 UTC
2
+++ chirp/uvb5.py
3
@@ -170,7 +170,7 @@ struct {
4
 """
5
 
6
 def do_ident(radio):
7
-    radio.pipe.setTimeout(3)
8
+    radio.pipe.timeout = 3
9
     radio.pipe.write("PROGRAM")
10
     ack = radio.pipe.read(1)
11
     if ack != '\x06':
(-)files/patch-chirp_vxa700.py (+20 lines)
Line 0 Link Here
1
--- chirp/vxa700.py.orig	2012-09-11 07:00:53 UTC
2
+++ chirp/vxa700.py
3
@@ -168,7 +168,7 @@ class VXA700Radio(chirp_common.CloneMode
4
 
5
     def sync_in(self):
6
         try:
7
-            self.pipe.setTimeout(2)
8
+            self.pipe.timeout = 2
9
             self._mmap = _download(self)
10
         except errors.RadioError:
11
             raise
12
@@ -183,7 +183,7 @@ class VXA700Radio(chirp_common.CloneMode
13
         #            0x01 <- air band only
14
         #            0x02 <- air band only
15
         try:
16
-            self.pipe.setTimeout(2)
17
+            self.pipe.timeout = 2
18
             _upload(self)
19
         except errors.RadioError:
20
             raise

Return to bug 217499