Browse Source

Added RAC test

master
Bob Finch 7 months ago
parent
commit
d2850ad826
  1. 33
      defs/RAC.def
  2. 15
      subs/callinfo.pl
  3. 35
      subs/scoreqso.pl

33
defs/RAC.def

@ -0,0 +1,33 @@
RAC Canada Day Contest # contest name
prov-band-mode # multiplier 1 - REQUIRED to have any score showing
- # score
- # multiplier 2
1 # # of exchange fields
5 # length of exchange field 1
0 # length of exchange field 2
0 # length of exchange field 3
0 # length of exchange field 4
[a-zA-Z0-9] # regex for every single character in exchange field 1
(NS|QC|ON|MB|SK|AB|BC|NT|NB|NL|NU|YT|PE)|[0-9]+ # regex for complete valid exchange field 1
[A-Za-z] # regex for every single character in exchange field 2
# regex for complete valid exchange field 2
[0-9A-Za-z] # regex for every single character in exchange field 3
# 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: %5s %s %s %s %-13s %-4s %-5s %-13s %-4s %-4s # cabrillo definition - how to format the info
freq mode date utc mycall rsts nr call rst exc1 # cabrillo definition - what info is included
RAC-Canada-Day # CBR (cabrillo) name - "title" for cabrillo file
exc1s # which fixed exchange is selected (variable assignment)
Providence # what fixed exchange info is asked for (prompted)
CQ TEST MYCALL MYCALL # F1 Key - What will be sent in CW mode
5NN NR # F2 "
TU # F3 "
MYCALL # F4 "
HISCALL # F5 "
NUM? # F6 "
AGN? # F7 "
BEGIN SCORE
if ($call =~ /V[AEOY][0-9]RAC/) { $score = 20 }
elsif ($exc1 =~ /NS|QC|ON|MB|SK|AB|BC|NT|NB|NL|NU|YT|PE/) { $score = 10 }
else { $score = 2}

15
subs/callinfo.pl

@ -411,6 +411,21 @@ sub callinfo {
addstr($win, " ") unless ($d =~ /CRA|GRL|MAN|PIE|SHE|WOO/);
}
refresh($win);
}
elsif ($contest eq 'RAC') { # RAC: Shows Sections
my @districts = qw/NS QC ON MB SK AB BC NT NB NL NU YT PE/;
addstr($win, 0, 0, "RAC - Canada Day Contest");
addstr($win, 2, 0, "Enter Ser. # OR these Providences;");
move($win, 4,0);
foreach my $d (@districts) {
addstr($win, $d);
attron($win, COLOR_PAIR(4));
addstr($win, " ") unless ($d =~ /YT/);
}
refresh($win);
}
else { # Show generic callsign info.

35
subs/scoreqso.pl

@ -1023,6 +1023,39 @@ sub scoreqso {
}
}
elsif ($main::defmult1 =~ /(prov)-(\w+)-(\w+)/) { # VE provs
my $mult = $qso{'exc1'};
if (&isveprov($mult)) {
# $2 can be 'band' or 'all', $3 can be 'mode' or 'all'.
if ($2 eq 'band') {
if ($3 eq 'all') { # regardless of mode
unless ($s_mult1->{$qso{'band'}} =~ / $mult /) {
$s_mult1->{$qso{'band'}} .= " $mult ";
}
}
elsif ($3 eq 'mode') {
unless ($s_mult1->{$qso{'band'}} =~ / $mult$qso{'mode'} /) {
$s_mult1->{$qso{'band'}} .= " $mult$qso{'mode'} ";
}
}
}
else { # mults over all bands
if ($3 eq 'all') {
unless ($s_mult1->{'All'} =~ / $mult /) {
$s_mult1->{'All'} .= " $mult ";
}
}
elsif ($3 eq 'mode') {
unless ($s_mult1->{'All'} =~ / $mult$qso{'mode'} /) {
$s_mult1->{'All'} .= " $mult$qso{'mode'} ";
}
}
}
}
}
elsif ($main::defmult1 eq 'none') {
$s_mult1->{All} = ' 1 ';
}
@ -1298,7 +1331,7 @@ sub isusstate {
sub isveprov {
my $test = shift;
if ($test =~
/^(NB|NS|QC|ON|MB|SK|AB|BC|NWT|NF|LB|YT|PEI|NU)$/
/^(NB|NS|QC|ON|MB|SK|AB|BC|NT|NL|YT|PE|NU)$/
) {
return 1;
}

Loading…
Cancel
Save