Skip to content

Commit

Permalink
counter update only on print line
Browse files Browse the repository at this point in the history
  • Loading branch information
Matija Nalis committed Jul 14, 2014
1 parent e86b273 commit 5c61e41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sirfbin_to_gp2.pl
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
$DEBUG && print "char=0x$x out=$out\n" ;

if ($x eq 'B3' and $last_x eq 'B0') { # packet ended, print it
if ($count1++ > 999) { $count2++; $count1=0; }
printf "00/00/0007 00:00:%02d.%03d (0) $out\n", $count2, $count1;
$out = '';
}
if ($count1++ > 999) { $count2++; $count1=0; }
$last_x = $x;
}

0 comments on commit 5c61e41

Please sign in to comment.