-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added pressure, weather code, fixed minor bugs
- Loading branch information
nizienko
committed
Jun 19, 2024
1 parent
5a66daf
commit b6cb479
Showing
6 changed files
with
112 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package services | ||
|
||
object WeatherCode { | ||
fun get(code: Int): String = when (code) { | ||
0 -> "Clear sky" | ||
1 -> "Mainly clear" | ||
2 -> "Partly cloudy" | ||
3 -> "Overcast" | ||
45 -> "Fog" | ||
48 -> "Depositing rime fog" | ||
51 -> "Light drizzle" | ||
53 -> "Moderate drizzle" | ||
55 -> "Dense intensity drizzle" | ||
56 -> "Light freezing drizzle" | ||
57 -> "Dense freezing drizzle" | ||
61 -> "Slight rain" | ||
63 -> "Moderate rain" | ||
65 -> "Heavy rain" | ||
66 -> "Light freezing rain" | ||
67 -> "Heavy freezing rain" | ||
71 -> "Slight snow fall" | ||
73 -> "Moderate snow fall" | ||
75 -> "Heavy snow fall" | ||
77 -> "Snow grains" | ||
80 -> "Slight rain showers" | ||
81 -> "Moderate rain showers" | ||
82 -> "Violent rain showers" | ||
85 -> "Slight Snow showers" | ||
86 -> "Heavy Snow showers" | ||
95 -> "Thunderstorm" | ||
96 -> "Thunderstorm with slight hail" | ||
99 -> "Thunderstorm with heavy hail" | ||
else -> "___" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters