From: minima Date: Fri, 17 Dec 2004 11:51:57 +0000 (+0000) Subject: added changes for VE7CC's windows programs. There may be more soon. X-Git-Tag: R_1_52~254 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?p=spider.git;a=commitdiff_plain;h=080b937d5e6d083879e9df1dd70def745efd8839 added changes for VE7CC's windows programs. There may be more soon. --- diff --git a/Changes b/Changes index b8bee59a..b284a1ef 100644 --- 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 index 00000000..b4ec3b14 --- /dev/null +++ b/cmd/set/ve7cc.pl @@ -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 index 00000000..8b6d8637 --- /dev/null +++ b/cmd/unset/ve7cc.pl @@ -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); diff --git a/perl/DXChannel.pm b/perl/DXChannel.pm index d0c995d9..1994846b 100644 --- a/perl/DXChannel.pm +++ b/perl/DXChannel.pm @@ -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); diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index ac141b36..5c3699a3 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -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); } diff --git a/perl/Spot.pm b/perl/Spot.pm index 462cb673..8708ac4d 100644 --- a/perl/Spot.pm +++ b/perl/Spot.pm @@ -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 index 00000000..43390fb9 --- /dev/null +++ b/perl/VE7CC.pm @@ -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;