Seeing wind speed on system status page
I made a very small change in the asystemstatus.asp, I like to see just how fast the wind is going. Even though I am in US, I prefer metric but wind returns the unit you are using. I don't know why I care about wind under 1km, maybe just to see if the wind sensor is working good. Always back up any code changed
Old code:
if(wind !== null) {
if(wind < 8.0)
ret += "Calm";
else
ret += "Wind";
}
New code:
if(wind !== null) {
if(wind <= 0.0)
ret += "Calm";
else if (wind >= 0.1 && wind <= 0.9)
ret += wind.toFixed(1) + "km/hr";
else
ret += wind.toFixed(0) + "km/hr";
}
OR this might be better for you
if(wind !== null) {
if(wind <= 0.0)
ret += "Calm";
else
ret += wind.toFixed(0) + "km/hr";
}