From 49d2124a03a27d7f219cc3b274bb288f88c5166a Mon Sep 17 00:00:00 2001 From: Nate Bargmann Date: Tue, 12 Feb 2013 18:39:47 -0600 Subject: [PATCH] Binding test scripts--fix set_freq ordering MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Due to the changes of the patch contributed by Ervin Hegedüs, correct the bindings test scripts to work with the corrected ordering of VFO and frequency arguments. Also add a call to send_morse() in each script. --- bindings/perltest.pl | 5 ++++- bindings/pytest.py | 10 +++++++--- bindings/tcltest.tcl | 5 ++++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/bindings/perltest.pl b/bindings/perltest.pl index dd7693d89..edd4ad654 100755 --- a/bindings/perltest.pl +++ b/bindings/perltest.pl @@ -23,7 +23,7 @@ $retry = $rig->get_conf("retry"); print "get_conf:\t\tpath = \"$rpath\", retry = $retry, ITU region = $region\n"; -$rig->set_freq(14266000, $Hamlib::RIG_VFO_A); +$rig->set_freq($Hamlib::RIG_VFO_A, 14266000); $f = $rig->get_freq(); print "freq:\t\t\t$f\n"; @@ -62,6 +62,9 @@ print "get_channel status:\t$rig->{error_status} = ".Hamlib::rigerror($rig->{err print "VFO:\t\t\t".Hamlib::rig_strvfo($chan->{vfo}).", $chan->{freq}\n"; +print "\nSending Morse, '73'\n"; +$rig->send_morse($Hamlib::RIG_VFO_A, "73"); + $rig->close(); diff --git a/bindings/pytest.py b/bindings/pytest.py index 21711d696..552a926d1 100755 --- a/bindings/pytest.py +++ b/bindings/pytest.py @@ -30,10 +30,10 @@ def StartUp (): print "get_conf:\t\tpath = %s, retry = %s, ITU region = %s" \ % (rpath, retry, region) - my_rig.set_freq (5700000000,Hamlib.RIG_VFO_B) - print "freq:\t\t\t",my_rig.get_freq() - my_rig.set_freq (145550000) + my_rig.set_freq (Hamlib.RIG_VFO_B, 5700000000) my_rig.set_vfo (Hamlib.RIG_VFO_B) + print "freq:\t\t\t",my_rig.get_freq() + my_rig.set_freq (Hamlib.RIG_VFO_A, 145550000) #my_rig.set_vfo ("VFOA") (mode, width) = my_rig.get_mode() @@ -66,6 +66,10 @@ def StartUp (): print "get_channel status:\t",my_rig.error_status print "VFO:\t\t\t",Hamlib.rig_strvfo(chan.vfo),", ",chan.freq + + print "\nSending Morse, '73'" + my_rig.send_morse(Hamlib.RIG_VFO_A, "73") + my_rig.close () print "\nSome static functions:" diff --git a/bindings/tcltest.tcl b/bindings/tcltest.tcl index bfba7c64a..c5dd223f7 100755 --- a/bindings/tcltest.tcl +++ b/bindings/tcltest.tcl @@ -21,7 +21,7 @@ rig_set_debug $RIG_DEBUG_NONE Rig my_rig $RIG_MODEL_DUMMY my_rig open -my_rig set_freq 145550000 +my_rig set_freq $RIG_VFO_A 145550000 puts "status:\t\t[my_rig cget -error_status]" @@ -51,6 +51,9 @@ puts "strength:\t[my_rig get_level_i $RIG_LEVEL_STRENGTH]" puts "status:\t\t[my_rig cget -error_status]" puts "status(str):\t[rigerror [my_rig cget -error_status]]" +puts "\nSending Morse, '73'" +my_rig send_morse $RIG_VFO_A "73" + my_rig close #my_rig cleanup