Ticket #3811: ENVCANParser.pm.patch
| File ENVCANParser.pm.patch, 737 bytes (added by , 18 years ago) |
|---|
-
ENVCANParser.pm
old new 119 119 $_[0] =~ /.?(\w+) (\d+) km\/h/; 120 120 $results{'wind_dir'} = $directions{$1}; 121 121 $results{'wind_speed'} = $2; 122 $results{'wind_spdgst'} = $2; 122 123 if ($_[0] =~ /gust (\d+) km\/h/m) { 124 $results{'wind_gust'} = $1; 125 } else { 126 $results{'wind_gust'} = 0; 127 } 123 128 } 124 129 125 130 $scratch = 0; … … 201 206 my ($data, @types) = @_; 202 207 203 208 # Initialize results hash 204 foreach my $type (@types) { $results{$type} = " "; }209 foreach my $type (@types) { $results{$type} = "NA"; } 205 210 206 211 my $p = HTML::Parser->new(api_version => 3); 207 212 $p->unbroken_text(1);
