Browse Source

Rig bugfix and right freq in cab file and

master
ct1drb 14 years ago
parent
commit
a824742b6e
  1. 2
      Makefile.PL
  2. 4
      defs/DXPED.def
  3. 28
      subs/callinfo.pl
  4. 2
      subs/displaylog.pl
  5. 2
      subs/qsy.pl
  6. 1
      subs/readlog.pl
  7. 25
      subs/rigctld.pl
  8. 17
      subs/writelog.pl
  9. 20
      yfktest

2
Makefile.PL

@ -36,7 +36,7 @@ installstuff:
echo installing $$i in $(YFKTESTDIR)/$$i ; \\
done ; \\
done
@for file in master.scp cty.dat friend.ini call_no_name.txt iota.txt hamlibrigs ; do \\
@for file in master.scp cty.dat friend.ini call_no_name.txt iota.csv hamlibrigs ; do \\
$(INSTALL) $$file $(YFKTESTDIR)/$$file ; \\
echo installing $$file in $(YFKTESTDIR)/$$file ; \\
done

4
defs/DXPED.def

@ -15,8 +15,8 @@ DXpedition
# regex for complete valid exchange field 3
[0-9] # regex for every single character in exchange field 4
# regex for complete valid exchange field 4
QSO: %5d %s %s %s %-13s %-3s %-6s %-13s %-3s %-6s %s
band mode date utc mycall rsts exc1s call rst exc1 stn
QSO: %s %s %s %s %-13s %-3s %-6s %-13s %-3s %-6s %s
freq mode date utc mycall rsts exc1s call rst exc1 stn
DXEXP

28
subs/callinfo.pl

@ -1,4 +1,4 @@
use strict;
use strict;
my %friends;
my %iota;
@ -13,14 +13,14 @@ while ($line = <FRIEND>) {
}
close FRIEND;
#open IOTA, find_file('iota.txt');
#my $line1;
#while ($line1 = <IOTA>) {
# chomp($line1);
# my @a = split(/=/, $line1);
# $iota{$a[0]} = $a[1];
#}
#close IOTA;
open IOTA, find_file('iota.csv');
my $line1;
while ($line1 = <IOTA>) {
chomp($line1);
my @a = split ',', $line1;
$iota{$a[0]} = $a[1] = $a[2];
}
close IOTA;
# FOC marathon
@ -240,7 +240,7 @@ sub callinfo {
attron($win, COLOR_PAIR(4));
addstr($win, " ") unless ($d =~ /PG/);
}
# addstr($win, 3, 0, "Iota: $iota{$call}".' 'x20) if defined ($iota{$call});
addstr($win, 3, 0, "Iota: $iota{$call}".' 'x20) if defined ($iota{$call});
addstr($win, 4, 0, "Name: $friends{$call}".' 'x20) if defined ($friends{$call});
refresh($win);
}
@ -251,8 +251,7 @@ sub callinfo {
addstr($win, 0, 0, "$info[7] - $info[0]".' 'x80);
addstr($win, 1, 0, "CQZ: $info[1], ITU: $info[2]".' 'x80);
addstr($win, 2, 0, "Name: $friends{$call}".' 'x80) if
defined ($friends{$call});
addstr($win, 2, 0, "Name: $friends{$call}".' 'x80) if defined ($friends{$call});
addstr($win, 3, 0, "FOC: $foc{$call}".' 'x80) if defined($foc{$call});
@ -271,7 +270,8 @@ sub callinfo {
addstr($win, 0, 0, "$info[7] - $info[0]".' 'x80);
addstr($win, 1, 0, "CQZ: $info[1], ITU: $info[2]".' 'x80);
addstr($win, 2, 0, "Iota: ".' 'x80);
addstr($win, 2, 0, "Iota: $iota{$call}".' 'x80) if defined ($iota{$call});
addstr($win, 3, 0, "Name: $friends{$call}".' 'x80) if defined ($friends{$call});
addstr($win, 2, 6, "$iota{$call}".' 'x80) if defined ($iota{$call});
refresh($win);
}
@ -323,7 +323,7 @@ sub callinfo {
addstr($win, 0, 0, "$info[7] - $info[0]".' 'x80);
addstr($win, 1, 0, "CQZ: $info[1], ITU: $info[2]".' 'x80);
addstr($win, 2, 0, "Name: $friends{$call}".' 'x80) if defined ($friends{$call});
# addstr($win, 3, 0, "Iota: $iota{$call}".' 'x80) if defined ($iota{$call});
addstr($win, 3, 0, "Iota: $iota{$call}".' 'x80) if defined ($iota{$call});
refresh($win);
return 0;

2
subs/displaylog.pl

@ -38,7 +38,7 @@ addstr($$window, $y, 37, $qsos[$i]{'exc1'}.' ');
addstr($$window, $y, 44, $qsos[$i]{'exc2'}.' ');
addstr($$window, $y, 49, $qsos[$i]{'exc3'}.' ');
addstr($$window, $y, 54, $qsos[$i]{'exc4'}.' ');
addstr($$window, 23, 40, $qsos[$i]{'freq'}.' ');
#addstr($$window, 23, 40, $qsos[$i]{'freq'}.' ');
move($$window, $y, 0);
chgat($$window, 58, A_REVERSE, 1, 0) if ($editnr == ($i+1));

2
subs/qsy.pl

@ -55,7 +55,7 @@ sub qsy {
sub qsyband {
my $direction = shift;
my $currentband = $main::qso{'band'};
my @bands = qw/160 80 40 30 20 17 15 12 10/;
my @bands = qw/160 80 40 30 20 17 15 12 10 6/;
my $pos=0;
for (0..$#bands) {

1
subs/readlog.pl

@ -26,7 +26,6 @@ sub readlog {
$main::transmitter= <LOG>;
#system ("rigctld -m 228 -r /dev/ttyUSB2 -s 9600 &");
$main::tmp = <LOG>; # :-| fixed exchange. will be put to right
# var in main.
$main::cwmessages[0] = <LOG>;

25
subs/rigctld.pl

@ -34,7 +34,8 @@ sub rigctld {
$freq /= 1000000;
addstr($wmain, 23, 40,"$freq");
addstr($wmain, 23, 40, "$freq MHz ");
$main::qso{'freq'} = $freq;
if (($freq >= 1.800) && ($freq <= 2.000)) { $freq = "160"; }
@ -76,19 +77,19 @@ addstr($wmain, 23, 40,"$freq");
}
}
elsif ($band =~ /^[0-9]+$/) { # band/freq
if ($band eq '6') { $band = '50.000000'; }
elsif ($band eq '10') { $band = '28.000000'; }
elsif ($band eq '12') { $band = '24.890000'; }
elsif ($band eq '15') { $band = '21.000000'; }
elsif ($band eq '17') { $band = '18.068000'; }
elsif ($band eq '20') { $band = '14.000000'; }
elsif ($band eq '30') { $band = '10.100000'; }
elsif ($band eq '40') { $band = '7.000000'; }
elsif ($band eq '80') { $band = '3.500000'; }
elsif ($band eq '160') { $band = '1.800000'; }
if ($band eq '6') { $band = '50000000'; }
elsif ($band eq '10') { $band = '28000000'; }
elsif ($band eq '12') { $band = '24890000'; }
elsif ($band eq '15') { $band = '21000000'; }
elsif ($band eq '17') { $band = '18068000'; }
elsif ($band eq '20') { $band = '14000000'; }
elsif ($band eq '30') { $band = '10100000'; }
elsif ($band eq '40') { $band = '7000000'; }
elsif ($band eq '80') { $band = '3500000'; }
elsif ($band eq '160') { $band = '1800000'; }
# if nothing matched, it was a frequency which will be passed right
# through, after conversion mHz to Hz
else { $band *= 10000000 }
else { $band *= 1000 }
print $main::hamlibsock "F $band";
}

17
subs/writelog.pl

@ -5,9 +5,9 @@ sub writelog {
my $cn = $main::cabrilloname;
my @cabvalues; # values of the cbr file, like mode, date, freq...
my %freq = (160 => 1800, 80 => 3500, 40 => 7000, 30 => 10100,
20 => 14000, 17 => 18068, 15=>21000, 12 => 24890,
10 => 28000, 6 => 50000);
# my %freq = (160 => 1800, 80 => 3500, 40 => 7000, 30 => 10100,
# 20 => 14000, 17 => 18068, 15=>21000, 12 => 24890,
# 10 => 28000, 6 => 50000);
if ($main::contest eq 'NAQP') {
if ($main::exc1s =~ /\//) {
@ -59,8 +59,11 @@ sub writelog {
if ($_ eq 'mycall') {
push @values, $main::mycall;
}
elsif ($_ eq 'band') {
push @values, $freq{$main::qsos[$i]{'band'}};
# elsif ($_ eq 'band') {
# push @values, $freq{$main::qsos[$i]{'band'}};
# }
elsif ($_ eq 'freq') {
push @values, ($main::qsos[$i]{'freq'} /=0.001);
}
elsif ($_ =~ /^rst/) {
if ($main::qsos[$i]{'mode'} eq 'SSB') {
@ -155,13 +158,13 @@ sub writelog {
$main::qsos[$i]{'band'}.'m ';
print ADIF "<freq:".(length($main::qsos[$i]{'freq'})).'>'.
$main::qsos[$i]{'freq'}.' ';
($main::qsos[$i]{'freq'} /=1000);
my $mode = $main::qsos[$i]{'mode'};
if ($mode eq 'P31') { $mode = 'PSK31'; }
if ($mode eq 'P63') { $mode = 'PSK63'; }
print ADIF "<mode:".length($mode).'>'.
print ADIF " <mode:".length($mode).'>'.
$mode.' ';
my $rst = '599';

20
yfktest

@ -367,18 +367,6 @@ if (-r 'rigctld.sh') {
refresh($wdialog1);
}
}
#if (-r 'rigctld.sh') {
# printw "\nExecuting rigctld...\n";
#addstr($wdialog1, 10, 1, "Executing rigctld");
#getch ();
# system('sh rigctld.sh');
#}else {
# printw "Do you want to configure your rig with rigctld?(y/n).\n";
# getch()
#}
#printw "Testar o rigctld.";
sub readhamlibrigs {
my $line;
@ -393,16 +381,8 @@ sub readhamlibrigs {
return %hash;
}
#if ($rigctld eq 'Rigctld' {
# Rigctld::rig_set_debug(0);
# our $rig = new Rigctld::Rig($rigmodel);
# $rig->set_conf("rig_pathname", $rigpath); # Set path/device
# $rig->open();
#}
$hamlibsock = new IO::Socket::INET ( PeerAddr => 'localhost',
PeerPort => 4532, Proto => 'tcp');
#}
##############################################################################
# Actual logging starts here

Loading…
Cancel
Save