Wind direction but 0 speed

Asked by Nate Walker

recommend changing str(int(report.getWindSpeed(),2)) to str(round(report.getWindSpeed(),2)) in
report_str += _("Wind: ") + wind[str(report.getWindCompass())] + _(" at ") + str(round(report.getWindSpeed(),2)) + "m/s\n"
otherwise the text can show North Northwest at 0 m/s. This makes it show North Northwest at 0.45 m/s. It could be rounded up to 1 decimal place, but I like accuracy ;)

Question information

Language:
English Edit question
Status:
Solved
For:
Weather wallpaper Edit question
Assignee:
No assignee Edit question
Solved by:
Raúl González Duque
Solved:
Last query:
Last reply:
Revision history for this message
Best Raúl González Duque (zootropo) said :
#1

Thank you Nate. I use the format %.2f in the CVS version already :-)

Revision history for this message
Nate Walker (kiwinewt) said :
#2

Great minds think alike.
I just hope that the format is changeable between imperial and metric, for those people who use normal standards vs. American ones ;)

Revision history for this message
Nate Walker (kiwinewt) said :
#3

Thanks Raúl González Duque, that solved my question.