]> dxcluster.org Git - spider.git/commitdiff
added changes for VE7CC's windows programs. There may be more soon.
authorminima <minima>
Fri, 17 Dec 2004 11:51:57 +0000 (11:51 +0000)
committerminima <minima>
Fri, 17 Dec 2004 11:51:57 +0000 (11:51 +0000)
Changes
cmd/set/ve7cc.pl [new file with mode: 0644]
cmd/unset/ve7cc.pl [new file with mode: 0644]
perl/DXChannel.pm
perl/DXCommandmode.pm
perl/Spot.pm
perl/VE7CC.pm [new file with mode: 0644]

diff --git a/Changes b/Changes
index b8bee59ac414510afaee93419cca443bde220e4e..b284a1efec005095a9d0fa5957925e21b3f1a84a 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,5 @@
+17Dec04=======================================================================
+1. add undocumented special command for VE7CC.
 10Dec04=======================================================================
 1. Included fixes sent in by David, N9KT for the new DB0SDX site.
 2. removed redundant "rm *bys" and "rm *cys" from Spot::init().
diff --git a/cmd/set/ve7cc.pl b/cmd/set/ve7cc.pl
new file mode 100644 (file)
index 0000000..b4ec3b1
--- /dev/null
@@ -0,0 +1,17 @@
+#
+# set the ve7cc output flag
+#
+# Copyright (c) 2000 - Dirk Koopman
+#
+# $Id$
+#
+
+my ($self, $line) = @_;
+my @args = split /\s+/, $line;
+my $call;
+my @out;
+
+return (0, $self->msg('e5')) unless $self->isa('DXCommandmode');
+$self->ve7cc(1);
+push @out, $self->msg('ok');
+return (1, @out);
diff --git a/cmd/unset/ve7cc.pl b/cmd/unset/ve7cc.pl
new file mode 100644 (file)
index 0000000..8b6d863
--- /dev/null
@@ -0,0 +1,17 @@
+#
+# set the ve7cc output flag
+#
+# Copyright (c) 2000 - Dirk Koopman
+#
+# $Id$
+#
+
+my ($self, $line) = @_;
+my @args = split /\s+/, $line;
+my $call;
+my @out;
+
+return (0, $self->msg('e5')) unless $self->isa('DXCommandmode');
+$self->ve7cc(0);
+push @out, $self->msg('ok');
+return (1, @out);
index d0c995d9756c3bd582e3ed2c9db8766f6b38d5a0..1994846b20894092ffd6f81a56c25057fe5f6169 100644 (file)
@@ -114,6 +114,7 @@ $count = 0;
                  build => '1,Node Build',
                  verified => '9,Verified?,yesno',
                  newroute => '1,New Style Routing,yesno',
+                 ve7cc => '0,VE7CC program special,yesno',
                 );
 
 use vars qw($VERSION $BRANCH);
index ac141b363cd0942462f6f0634fc17a5852117869..5c3699a38190c25f37b6c9d168e6d58ec83080a3 100644 (file)
@@ -34,6 +34,7 @@ use Script;
 use Net::Telnet;
 use QSL;
 use DB_File;
+use VE7CC;
 
 use strict;
 use vars qw(%Cache %cmd_cache $errstr %aliases $scriptbase $maxerrors %nothereslug $maxbadcount);
@@ -859,20 +860,26 @@ sub dx_spot
        my $self = shift;
        my $line = shift;
        my $isolate = shift;
+       return unless $self->{dx};
+
        my ($filter, $hops);
 
-       return unless $self->{dx};
-       
        if ($self->{spotsfilter}) {
                ($filter, $hops) = $self->{spotsfilter}->it(@_ );
                return unless $filter;
        }
 
        dbg('spot: "' . join('","', @_) . '"') if isdbg('dxspot');
-       
-       my $buf = $self->format_dx_spot(@_);
-       $buf .= "\a\a" if $self->{beep};
-       $buf =~ s/\%5E/^/g;
+
+       my $buf;
+       if ($self->{ve7cc}) {
+               $buf = VE7CC::dx_spot($self, @_);
+       } else {
+               $buf = $self->format_dx_spot(@_);
+               $buf .= "\a\a" if $self->{beep};
+               $buf =~ s/\%5E/^/g;
+       }
+
        $self->local_send('X', $buf);
 }
 
index 462cb673f7fd02db3b00e6bb94a4e4a4ba9df3df..8708ac4df79e953639ea5851bb7d7b97768f1fa8 100644 (file)
@@ -136,7 +136,7 @@ sub prepare
 
 sub add
 {
-       my $buf = join("\^", @_);
+       my $buf = join('^', @_);
        $fp->writeunix($_[2], $buf);
        $totalspots++;
        if ($_[0] <= 30000) {
diff --git a/perl/VE7CC.pm b/perl/VE7CC.pm
new file mode 100644 (file)
index 0000000..43390fb
--- /dev/null
@@ -0,0 +1,40 @@
+#
+# VE7CC variations for DXCommandmode
+#
+# This is done this way because a) there aren't very many and 
+# b) because it isn't easy to reliably rebless the object in
+# flight (as it were).
+#
+# This could change.
+#
+
+package VE7CC;
+
+use DXVars;
+use DXDebug;
+use DXUtil;
+use Julian;
+use Prefix;
+
+use strict;
+
+use vars qw($VERSION $BRANCH);
+$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
+$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/  || (0,0));
+$main::build += $VERSION;
+$main::branch += $BRANCH;
+
+sub dx_spot
+{
+       my $self = shift;                       # this may be useful some day
+       my $freq = shift;
+       my $spotted = shift;
+       my $t = shift;
+       
+       # remove interface callsign;
+       pop;
+       
+       return sprintf("CC11^%0.1f^%s^", $freq, $spotted) . join('^', cldate($t), ztime($t), @_);
+}
+
+1;