Skip to content

Commit

Permalink
warn about "leading zero was not 00" also in raw4t comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Matija Nalis committed Jan 4, 2015
1 parent 9bb66f5 commit b9b92c4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions enc4t_gp2_to_raw4t_gp2.pl
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ ($)

my $date = $1; my $time = $2; my $msec=$3;
my @data = split ' ', $4;
my $extra = '';

#### byte 0 (always 00) ####
my $p_lead_zero = shift @data;
if ($p_lead_zero ne '00') { warn "# WARNING: leading zero not 00 but $p_lead_zero in $_" }
if ($p_lead_zero ne '00') { warn "# WARNING: leading zero not 00 but $p_lead_zero in $_"; $extra .= " (WARNING: leading zero was not 00 but $p_lead_zero)" }
print " leading 00 -- OK\n" if $DEBUG > 7;

#### byte 1-2 (sequence1) ####
Expand Down Expand Up @@ -126,7 +127,7 @@ ($)


print "00/00/0006 $time$msec (0) ${p_payload}";
print "\t# seq1=$p_seq1 seq2=$p_seq2 len=$p_length" if $DEBUG > 1;
print "\t# seq1=$p_seq1 seq2=$p_seq2 len=$p_length$extra" if $DEBUG > 1;
print "\n";

} else {
Expand Down

0 comments on commit b9b92c4

Please sign in to comment.