Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #349: internet_weather.pl negative temp #350

Merged
merged 1 commit into from
Jan 3, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions code/common/internet_weather.pl
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ sub normalize_conditions {
$forecast = read_all $f_weather_forecast;

if (length($forecast) < 50) {
respond "app=weather Last weather forecast received was incomplete."
respond("app=weather Last weather forecast received was incomplete.");
} else {
respond "app=weather $forecast";
respond("app=weather $forecast");
}
}

Expand All @@ -113,7 +113,7 @@ sub normalize_conditions {
$conditions = read_all $f_weather_conditions;
$conditions = normalize_conditions($conditions);

respond "app=weather $conditions";
respond("app=weather $conditions");
}

if (done_now $p_weather_forecast) {
Expand All @@ -140,7 +140,7 @@ sub normalize_conditions {

$conditions = normalize_conditions($conditions);

$w{TempOutdoor} = $1 if $conditions =~ /(\d+) degrees/i;
$w{TempOutdoor} = $1 if $conditions =~ /(-?\d+) degrees/i;
if ($conditions =~ /(\d+)\%/) {
$w{HumidOutdoor} = $1;
$w{HumidOutdoorMeasured}=1; # tell Weather_Common that we directly measured humidity
Expand Down