Ticket #4079: 4079_diff.patch

File 4079_diff.patch, 832 bytes (added by Joe Ripley <vitaminjoe@…>, 17 years ago)

Patches ENVCANParser.pm to accept negative temperatures for 'Current Conditions' screen

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

     
    108108        }
    109109               
    110110        if ($inside{dd}) {
    111                 if ($scratch == 1) { $_[0] =~ /(\d*).*/; $results{'temp'} = $1; $results{'windchill'} = $1; $results{'appt'} = $1; }
     111                if ($scratch == 1) { $_[0] =~ /(-?\d*).*/; $results{'temp'} = $1; $results{'windchill'} = $1; $results{'appt'} = $1; }
    112112                if ($scratch == 2) { $_[0] =~ /(\d*\.\d+) kPa.*/; $results{'pressure'} = $1 * 10; }
    113113                if ($scratch == 3) { $_[0] =~ /(\d*) km/; $results{'visibility'} = $1; }
    114114                if ($scratch == 4) { $_[0] =~ /(\d*) \%/; $results{'relative_humidity'} = $1; }