Ticket #9657: 9657-ticket.patch

File 9657-ticket.patch, 1.5 KB (added by vitaminjoe@…, 9 years ago)

Patch to fix ENVCANParser.pm

  • mythplugins/mythweather/mythweather/scripts/ca_envcan/ENVCANParser.pm

    diff --git a/mythplugins/mythweather/mythweather/scripts/ca_envcan/ENVCANParser.pm b/mythplugins/mythweather/mythweather/scripts/ca_envcan/ENVCANParser.pm
    index 0d0e3d6..c87c0b3 100644
    a b sub doParse { 
    9393                $results{'weather_icon'} = getIcon($1);
    9494            }
    9595            $results{'temp'}     = sprintf("%.0f", $1)
    96                 if ($item->{description} =~ /Temperature:\<\/b\>\s*(-?\d*\.?\d*)\260\C\s*\<br\/\>/s);
     96                if ($item->{description} =~ /Temperature:\<\/b\>\s*(-?\d*\.?\d*)\&deg\;\C\s*\<br\/\>/s);
    9797            $results{'pressure'} = sprintf("%d", $1 * 10)
    9898                if ($item->{description} =~ /Pressure \/ Tendency:\<\/b\>\s*(\d*\.?\d*) kPa\s*.*\<br\/\>/s);
    9999            $results{'visibility'} = sprintf("%.1f", $1)
    sub doParse { 
    105105                $results{'windchill'} = $1;
    106106            }
    107107            $results{'dewpoint'} = sprintf("%.0f", $1)
    108                 if ($item->{description} =~ /Dewpoint:\<\/b\>\s*(-?\d*\.?\d*)\260\C\s*\<br\/\>/s);
     108                if ($item->{description} =~ /Dewpoint:\<\/b\>\s*(-?\d*\.?\d*)\&deg\;\C\s*\<br\/\>/s);
    109109            if ($item->{description} =~ /(\d*\:\d*[\w ]*\d*[\w *]\d*)\s*\<br\/\>/s) {
    110110                $results{'observation_time'} = "Last updated at ". $1;
    111111                $results{'updatetime'} = "Last updated at ". $1;