/[RFID]/portmon-3m-810-decode.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /portmon-3m-810-decode.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 11 by dpavlin, Sun Sep 28 22:17:22 2008 UTC revision 14 by dpavlin, Wed Oct 1 18:46:03 2008 UTC
# Line 6  Line 6 
6    
7  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
8    
9    my $dump_chars = 0;
10  my $debug = 1;  my $debug = 1;
11    
12  my $p;  my $p;
13    
14  sub as_chars {  sub as_chars {
# Line 53  while(<>) { Line 55  while(<>) {
55                                  } else {                                  } else {
56                                          warn sprintf("FULL %5s %2d | %s\n", $op, $len, $h);                                          warn sprintf("FULL %5s %2d | %s\n", $op, $len, $h);
57                                          my @msg = splice( @h, 0, $len + 3 );                                          my @msg = splice( @h, 0, $len + 3 );
58                                          printf("%-5s 0x%02x %-80s %s\n", $op, $#msg, join(' ', @msg), as_chars( @msg ));                                          printf("%-5s 0x%02x %-80s %s\n", $op, $#msg, join(' ', @msg), $dump_chars ? as_chars( @msg ) : '');
59                                          $p->{$op} = join(' ', @h);                                          $p->{$op} = join(' ', @h);
60                                          warn "LEFT: ", $p->{$op} if $p->{$op};                                          warn "LEFT: ", $p->{$op} if $p->{$op};
61                                  }                                  }

Legend:
Removed from v.11  
changed lines
  Added in v.14

  ViewVC Help
Powered by ViewVC 1.1.26