sub decode_dts
{
my $dts = shift;
- my ($dt, $seqno) = map {hex} unpack "H6H4", $dts;
+ my ($dt, $seqno) = map {hex} unpack "A6 A4", $dts;
my $secs = $dt & 0x3FFFF;
$dt >>= 18;
my $day = $dt >> 1;
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) {
$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];
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},