From: Dirk Koopman Date: Thu, 30 Jan 2025 11:23:25 +0000 (+0000) Subject: fix borked dx command X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=1b234633a15b5a0404da2c66eac1120031afe8da;p=spider.git fix borked dx command --- diff --git a/Changes b/Changes index 3c52892d..e457e50b 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,6 @@ +29Jan25====================================================================== +1. Fix dx command . "I never changed that bit". If I had this would + never have happened. 28Jan25====================================================================== 1. Set default Spot qrg granularity to 1KHz (was 25KHz). 2. Refine Incoming CCLuster connection handling. It is a requirement that a diff --git a/cmd/dx.pl b/cmd/dx.pl index a6475347..dde04a86 100644 --- a/cmd/dx.pl +++ b/cmd/dx.pl @@ -155,7 +155,7 @@ return (1, @out) unless $valid; # Store it here (but only if it isn't baddx) my $t = (int ($main::systime/60)) * 60; -return (1, $self->msg('dup')) if Spot::dup($freq, $spotted, $t, $line, $spotter, $main::mycall); +return (1, $self->msg('dup')) if Spot::dup_find($freq, $spotted, $t, $line, $spotter, $main::mycall); my @spot = Spot::prepare($freq, $spotted, $t, $line, $spotter, $main::mycall, $ipaddr); #$DB::single = 1; diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index bc362456..d5cb1607 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -620,8 +620,12 @@ sub process if ($dxchan->{isslugged} && $main::systime > $dxchan->{isslugged}) { foreach my $ref (@{$dxchan->{sluggedpcs}}) { if ($ref->[0] == 61) { - Spot::add(@{$ref->[2]}); - DXProt::send_dx_spot($dxchan, $ref->[1], @{$ref->[2]}); + unless (Spot::dup_find(@{$ref->[2]})) { + Spot::dup_add(@{$ref->[2]}); + DXProt::send_dx_spot($dxchan, $ref->[1], @{$ref->[2]}); + } else { + dbg("DXCommand: process slugged spot $ref->[1] is a dupe, ignored" ); + } } } diff --git a/perl/Spot.pm b/perl/Spot.pm index d84404b5..b01bafb0 100644 --- a/perl/Spot.pm +++ b/perl/Spot.pm @@ -495,8 +495,8 @@ sub dup_add # remove SSID or area $by =~ s|[-/]\d+$||; -# $freq = sprintf "%.1f", $freq; # normalise frequency - $freq = int $freq; # normalise frequency + $freq = sprintf "%.1f", $freq; # normalise frequency +# $freq = int $freq; # normalise frequency my $qrg = nearest($qrggranularity, $freq); # to the nearest however many hz