From d594c24d412299ee4f710bfda6f27190119be356 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 24 Jul 2006 17:24:47 +0000 Subject: [PATCH] Fixed save/restore of PttPort in WSJT.INI git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/trunk@202 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- wsjt.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/wsjt.py b/wsjt.py index fe59afdeb..2a8bcfa7e 100644 --- a/wsjt.py +++ b/wsjt.py @@ -2016,12 +2016,15 @@ try: # elif key == 'RxDelay': options.RxDelay.set(value) # elif key == 'TxDelay': options.TxDelay.set(value) elif key == 'IDinterval': options.IDinterval.set(value) - elif key == 'ComPort': + elif key == 'PttPort': try: - options.ComPort.set(value) - Audio.gcom2.nport=options.ComPort.get() + options.PttPort.set(value) + try: + Audio.gcom2.nport=int(options.PttPort.get()) + except: + Audio.gcom2.nport=0 except: - options.ComPort.set(0) + options.PttPort.set("/dev/cuad0") Audio.gcom2.nport=0 Audio.gcom2.pttport=(options.PttPort.get()+' ')[:12] elif key == 'Mileskm': options.mileskm.set(value) @@ -2132,7 +2135,7 @@ f.write("HisGrid " + t + "\n") #f.write("RxDelay " + str(options.RxDelay.get()) + "\n") #f.write("TxDelay " + str(options.TxDelay.get()) + "\n") f.write("IDinterval " + str(options.IDinterval.get()) + "\n") -f.write("ComPort " + str(options.PttPort.get()) + "\n") +f.write("PttPort " + str(options.PttPort.get()) + "\n") f.write("Mileskm " + str(options.mileskm.get()) + "\n") f.write("MsgStyle " + str(options.ireport.get()) + "\n") f.write("Region " + str(options.iregion.get()) + "\n")