projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0dfc6b8
)
fix date / time stamp decoding
author
minima
<minima>
Wed, 23 Feb 2005 17:27:28 +0000
(17:27 +0000)
committer
minima
<minima>
Wed, 23 Feb 2005 17:27:28 +0000
(17:27 +0000)
perl/Aranea.pm
patch
|
blob
|
history
perl/Thingy/Dx.pm
patch
|
blob
|
history
diff --git
a/perl/Aranea.pm
b/perl/Aranea.pm
index 3a2190e7389ccabfe697172d615245594a4db180..5663b80adc89a337ffe779557f5752fbf32e84b1 100644
(file)
--- a/
perl/Aranea.pm
+++ b/
perl/Aranea.pm
@@
-286,7
+286,7
@@
sub genheader
sub decode_dts
{
my $dts = shift;
sub decode_dts
{
my $dts = shift;
- my ($dt, $seqno) = map {hex} unpack "
H6H
4", $dts;
+ my ($dt, $seqno) = map {hex} unpack "
A6 A
4", $dts;
my $secs = $dt & 0x3FFFF;
$dt >>= 18;
my $day = $dt >> 1;
my $secs = $dt & 0x3FFFF;
$dt >>= 18;
my $day = $dt >> 1;
@@
-374,6
+374,7
@@
sub input
my $class = 'Thingy::' . ucfirst(lc $cmd);
my $thing;
my ($t, $seqno, $ntp) = decode_dts($dts) unless $err;
my $class = 'Thingy::' . ucfirst(lc $cmd);
my $thing;
my ($t, $seqno, $ntp) = decode_dts($dts) unless $err;
+ dbg("dts: $dts = $ntp $t($main::systime) $seqno") if isdbg('dts');
$err .= "invalid date/seq," unless $t;
if ($err) {
$err .= "invalid date/seq," unless $t;
if ($err) {
diff --git
a/perl/Thingy/Dx.pm
b/perl/Thingy/Dx.pm
index c94760c25378809e7959fabcca595e76fab408b8..1311e8f15fa6e99fd776d276703781f5f1a5818f 100644
(file)
--- a/
perl/Thingy/Dx.pm
+++ b/
perl/Thingy/Dx.pm
@@
-31,7
+31,7
@@
sub gen_Aranea
$thing->{f} = $sd->[0];
$thing->{c} = $sd->[1];
$thing->{b} = $sd->[4] unless $thing->{user};
$thing->{f} = $sd->[0];
$thing->{c} = $sd->[1];
$thing->{b} = $sd->[4] unless $thing->{user};
- my $t =
int($sd->[2] / 60)
;
+ my $t =
$sd->[2]
;
$thing->{t} = sprintf("%X", $t) unless $t eq int($main::systime / 60);
$thing->{o} = $sd->[7] unless $sd->[7] eq $main::mycall;
$thing->{i} = $sd->[3] if $sd->[3];
$thing->{t} = sprintf("%X", $t) unless $t eq int($main::systime / 60);
$thing->{o} = $sd->[7] unless $sd->[7] eq $main::mycall;
$thing->{i} = $sd->[3] if $sd->[3];
@@
-45,7
+45,7
@@
sub from_Aranea
my $thing = shift;
return unless $thing;
my $t = hex($thing->{t}) if exists $thing->{t};
my $thing = shift;
return unless $thing;
my $t = hex($thing->{t}) if exists $thing->{t};
- $t ||=
$thing->{time} / 60;
# if it is an aranea generated
+ $t ||=
int($thing->{time} / 60);
# if it is an aranea generated
my @spot = Spot::prepare(
$thing->{f},
$thing->{c},
my @spot = Spot::prepare(
$thing->{f},
$thing->{c},